Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python read from stdin pipe

k = 0
try:
    while True:
        print sys.stdin.readline()
        k += 1
except KeyboardInterrupt:
    sys.stdout.flush()
    pass
print k
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #read #stdin #pipe
ADD COMMENT
Topic
Name
1+8 =