pipes like perl
max2 at fisso.casa
Tue Aug 23 20:40:25 CEST 2005
bruno modulix wrote:
> max(01)* wrote:
>>it doesn't work, since "*do_something*" and *do_something_more* are
>>always executed (it seems like
>>MYPIPE = os.popen("*some_system_command*", "r")
>>does not raise any exception even if *some_system_command* does not
> The exit status of the command (encoded in the format specified for
> wait()) is available as the return value of the close() method of the
> file object, except that when the exit status is zero (termination
> without errors), None is returned.
but i need to check the success/failure of the external command *before*
closing the file!
More information about the Python-list