Hi -- I am using: Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32 on Windows 5.1 (Build 2600) I would like to be able to "pipe" input to my Python program, so that I could say something like (on Windows): type spam.txt | eggs.py so that eggs.py can process the file spam.txt, by reading it from sys.stdin. But this doesn't work as I expected. I can't find any documentation or bug reports on this. Here is eggs.py: # eggs.py import sys if not sys.stdin.isatty(): text = sys.stdin.read() print text print "bye." But when I attempt to pipe input to eggs.py, I get: > type spam.txt | eggs.py Traceback (most recent call last): File "c:\eggs.py", line 4, in ? text = sys.stdin.read() IOError: [Errno 9] Bad file descriptor > The same error occurs with: eggs.py