Shashwat Anand wrote: > raw_input uses sys.stderr I guess ?
I had a look at the C code, but it's a bit confusing. If I'm reading it correctly the prompt is written to the "real" stderr if and only if sys.stdin and sys.stdout are attached to a terminal. $ python -c"raw_input('prompt\n')" 2>tmp.txt foo $ cat tmp.txt prompt $ python -c"raw_input('prompt\n')" 2>tmp.txt | cat foo prompt $ cat tmp.txt I wonder if that is intentional. Peter -- http://mail.python.org/mailman/listinfo/python-list