command line arguments processing: an ugly lpr wrapper
do-not-spam-ben.hutchings at businesswebsoftware.com
Tue Mar 18 11:13:22 CET 2003
In article <b535r7$s2f$1 at bob.news.rcn.net>, morden wrote:
> os.execv("/usr/bin/lpr", new_arg)
> # should I exit(os.execv("/usr/bin/lpr", new_arg)) instead?
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