Re: pass named parameters to python

From: Duncan Booth (duncan.booth_at_invalid.invalid)
Date: 02/08/05


Date: 8 Feb 2005 16:59:35 GMT

John Leslie wrote:

> I am converting a korn shell script to python and want to be able to
> pass named arguments into python e.g -firstparam -secondparam
>
> Can this be done?
>

See the module 'optparse'.
http://www.python.org/doc/current/lib/module-optparse.html