query about file objects and popen3()

Dave Harrison dlharris at mail.usyd.edu.au
Sun Nov 25 12:30:11 CET 2001

I am writing a wrapper script for another program and im using popen3 to call that program, which then returns me the tuple of 3 file objects, the first two of which are std::out and std::err 

now under some circumstances obviously the output I need to process is in std::out and other times std::err ...

I need to know how I can test a file object to find out if it is empty or not ?

the std::out ouput, if there, will always be the same format so I will be string splitting it
the std::err output will just be dumped to screen
but I need to be able to differentiate the two


More information about the Python-list mailing list