Created
June 6, 2014 11:27
-
-
Save ulises/4f6729e19ce3f1e6a2e7 to your computer and use it in GitHub Desktop.
This file contains 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
def run(exe): | |
p = Popen(exe, stdout=PIPE, stderr=STDOUT) | |
while(True): | |
retcode = p.poll() #returns None while subprocess is running | |
line = p.stdout.readline() | |
yield line | |
if(retcode is not None): | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment