Reading from stdin (in windows)
durumdara at gmail.com
durumdara at gmail.com
Tue Oct 14 04:58:35 EDT 2008
Hi!
I wanna write a file processor in python (Windows XP).
I wanna use pipe, and not parameters.
When I write this:
...
l = []
while 1:
t = sys.stdin.read(1)
if t == '':
break
l.append(t)
t = "".join(l)
...
and use code this:
process.py <test.txt
I got:
"Bad file descriptor"
What I do wrong? I need to call this module in another format?
Or I read in wrong way?
Thanks for your help:
dd
More information about the Python-list
mailing list