[Tutor] A question about using stdin/out/err vs named files

George R Goffe grgoffe at yahoo.com
Sat Oct 18 20:36:43 CEST 2014


Hi,

When you run a python program, it appears that stdin, stdout, and stderr are opened automatically.

I've been trying to find out how you tell if there's data in stdin (like when you pipe data to a python program) rather 
than in a named input file. It seems like most/all the Unix/Linux 
commands are able to figure this out. Do you know how Python programs do this or might do this?

MANY thanks for any/all help/hints/tips/suggestions,

George...


More information about the Tutor mailing list