Re: Reading from stdin (in windows)

2008-10-14 Thread Rob Williscroft
[EMAIL PROTECTED] wrote in news:mailman.2448.1223974725.3487.python- [EMAIL PROTECTED] in comp.lang.python: 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

Reading from stdin (in windows)

2008-10-14 Thread [EMAIL PROTECTED]
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