| Store | Cart

Reading from stdin

From: C GIllespie <csgc...@hotmail.com>
Wed, 10 Mar 2004 14:56:40 -0000
Dear All,

I have a C program that prints out numbers 1 to 10 to stdout. I wish to pipe
this into a python script to print out the numbers, e.g. ./myCProg |
myPython.py

However, I want the python script to print out the numbers as it gets them,
since there could be hours/days between numbers - not a very efficient C
program :). Actually, I would like to read-a-line/ print-a-line/
read-a-line/etc

I have tried things like 'sys.stdin.read*' with no success.

Thanks

Colin

Recent Messages in this Thread
C GIllespie Mar 10, 2004 02:56 pm
Skip Montanaro Mar 10, 2004 03:14 pm
Christian Vogel Mar 10, 2004 03:20 pm
C GIllespie Mar 10, 2004 05:36 pm
P...@draigBrady.com Mar 11, 2004 11:03 am
Messages in this thread

Previous post: wxWindows Themes