Created
February 12, 2015 14:40
-
-
Save anonymous/5612e3df3c111ef8cc09 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
from subprocess import Popen, PIPE | |
p = Popen(["hcitool", "lescan"], stdout=PIPE, bufsize=1) | |
for line in iter(p.stdout.readline, b''): | |
print line | |
p.communicate() # close p.stdout, wait for the subprocess to exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment