[getopt-sig] A simple remark for the next Python command line option standard parser
Laurent Pointal
laurent.pointal@lure.u-psud.fr
Thu, 14 Feb 2002 09:20:55 +0100
A problem I encounter with standard getopt module is its absolute necessity
to know all possible options (it raises an exception for unknown options).
I'm in the context of a tool module, with its **own** options. Application
programmer use this module but dont have to care with its specific options
(that may change as module evoluate).
What I need from the command line parser is the possibility to parse the
command line to search for my tool options in my tool init function, and to
ignore options which are targeted to other tools or to the main program
(currently I rewrote my own -quick and not too dirty- sys.argv processing
for my module need, but I would prefer use a standard module for that).
Sure, it may be nice "consume" options, or to mark them as processed, to
identify in a time which are the options which are not used (and to signal
it to users).
Good design.
A+
Laurent.
---
Laurent POINTAL - CNRS/LURE - Service Informatique Experiences
Tel/fax: 01 64 46 82 80 / 01 64 46 41 48
email : laurent.pointal@lure.u-psud.fr ou laurent.pointal@laposte.net