Library for handling GNU parameters
loic at yermat.net1.nerim.net
Mon Feb 23 23:24:40 CET 2004
Peter Hansen a écrit :
> Florian Lindner wrote:
>>is there a python library available for handling GNU parameters. For
>>prog --filename=foo.bar is the same as prog -f foo.bar
>>prog --execute == prog -e
>>I look for a library for parsing these string and represent the values in a
> The standard library module getopt can do that, at least for the sort
> of example you show, and I suspect the newer standard library module
> optparse could also handle it (but haven't tried myself).
Standard Module optparse
Note that if you do not have python2.3 you can just put the optparse.py
and put it in you python2.2 directory, it will work !
More information about the Python-list