Skip to content

Instantly share code, notes, and snippets.

@abbot
Created May 18, 2011 21:00
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 abbot/979549 to your computer and use it in GitHub Desktop.
Save abbot/979549 to your computer and use it in GitHub Desktop.
import subprocess
p = subprocess.Popen("cat", stdin=subprocess.PIPE, stdout=subprocess.PIPE)
chunk = 1024
count = 0
while True:
p.stdin.write("0" * chunk)
count += chunk
print count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment