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)| #!/bin/sh | |
| if ! type "efetch" > /dev/null; then | |
| print "Please install E-utilitie." | |
| fi | |
| GSM_LIST=$1 | |
| GSMs=`cat $GSM_LIST|cut -f1` | |
| #echo $SRRs | |
| ! type "foo" > /dev/null 2>&1; | |
| for GSM in $GSMs; do |
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)