Skip to content

Instantly share code, notes, and snippets.

@jbochi
Created July 5, 2013 19:52
Show Gist options
  • Save jbochi/5936821 to your computer and use it in GitHub Desktop.
Save jbochi/5936821 to your computer and use it in GitHub Desktop.
slow pipe
import sys
import time
delay = float(sys.argv[1])
for line in sys.stdin:
sys.stdout.write(line)
time.sleep(delay)
@jbochi
Copy link
Author

jbochi commented Jul 5, 2013

Usage to replay logs:

$ cat huge.log | python -u slow.py 0.2 > replay.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment