Skip to content

Instantly share code, notes, and snippets.

@yurenju
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yurenju/4abf50117c48478288d4 to your computer and use it in GitHub Desktop.
Save yurenju/4abf50117c48478288d4 to your computer and use it in GitHub Desktop.
import subprocess
p = subprocess.Popen(['make'], shell=False, stdout=subprocess.PIPE,
cwd='/home/yurenju/src/gaia', stderr=subprocess.STDOUT,
env={'DESKTOP': '0', 'DESKTOP_SHIMS': '1', 'DEBUG': '1', 'NOFTU': '1'})
loop = True
while loop:
if p.poll() is not None:
loop = False
while True:
line = p.stdout.readline()
if not line:
break
print line,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment