Here's a few things I tried to write output to a python subprocess pipe.
from subprocess import Popen, PIPE
p = Popen('less', stdin=PIPE)
for x in xrange(100):
p.communicate('Line number %d.\n' % x)
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
#!/bin/sh | |
# recursively removes all .pyc files and __pycache__ directories in the current | |
# directory | |
find . | grep -E "(__pycache__|\.pyc$)" | xargs rm -rf |
Here's a few things I tried to write output to a python subprocess pipe.
from subprocess import Popen, PIPE
p = Popen('less', stdin=PIPE)
for x in xrange(100):
p.communicate('Line number %d.\n' % x)