Skip to content

Instantly share code, notes, and snippets.

@dhrrgn
Last active December 25, 2015 21:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhrrgn/7045696 to your computer and use it in GitHub Desktop.
Save dhrrgn/7045696 to your computer and use it in GitHub Desktop.
Why am I not getting the full git clone output here?
# assume all imports are done
#Old: proc = subprocess.Popen(['git', 'clone', '[url here]'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# Fixed
proc = subprocess.Popen(['git', 'clone', '--progress' '[url here]'],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
while proc.poll() is None:
out = proc.stdout.readline()
print out
Works as expected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment