command line arguments processing: an ugly lpr wrapper
Ben Hutchings
do-not-spam-ben.hutchings at businesswebsoftware.com
Tue Mar 18 05:13:22 EST 2003
In article <b535r7$s2f$1 at bob.news.rcn.net>, morden wrote:
<snip>
> os.execv("/usr/bin/lpr", new_arg)
>
> # should I exit(os.execv("/usr/bin/lpr", new_arg)) instead?
<snip>
No. The exec family of functions *replaces* your program with the
one you specify. They never return successfully, and in Python,
they raise an exception when they fail.
More information about the Python-list
mailing list