[leglug-users] Python - Parsing command line params
Edmond
edmond at greencedars.com
Mon Jun 25 22:46:56 EDT 2007
On Mon, 25 Jun 2007, Hisham Mardam Bey wrote:
> You asked on #leglug about Python and command line option parsing,
> here's some code (excuse the + signs) someone committed to our CVS
> repository the other day:
>
> +# Parse command line
> +from optparse import OptionParser
> +
[...]
The code is poorly written, but in the right direction. Check these
out instead, particularly the first one.
http://docs.python.org/lib/module-getopt.html
or the more powerful (but more complicated):
http://docs.python.org/lib/module-optparse.html
Regards,
Edmond
More information about the leglug-users
mailing list