pipes like perl
onurb at xiludom.gro
Tue Aug 23 19:55:28 CEST 2005
> 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
> any help?
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.
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"
More information about the Python-list