Created
October 15, 2018 02:18
-
-
Save TakehikoShimojima/24cdcd720f5e3bf64c9d841fc0807cc4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ScanDelegate(DefaultDelegate): | |
| def handleDiscovery(self, scanEntry, isNewDev, isNewData): | |
| print(strftime("%Y-%m-%d %H:%M:%S", gmtime()), scanEntry.addr, scanEntry.getScanData()) | |
| sys.stdout.flush() | |
| scanner = Scanner().withDelegate(ScanDelegate()) | |
| scanner.scan(10.0, passive=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment