Created
December 25, 2015 15:13
-
-
Save zeromodule/aa93521bbf5e8c5f2c48 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
vagrant@vagrant-ubuntu-trusty-64:~$ cat sub.py | |
from subprocess import Popen, PIPE, STDOUT | |
sub_process = Popen('ls -la', shell=True, bufsize=0) | |
while sub_process.poll() is None and sub_process.stdout is not None: | |
print sub_process.stdout.readline() | |
print "End" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment