optional args for getopt()

Richard Jones richard at bizarsoftware.com.au
Thu Aug 23 05:43:52 CEST 2001


On Thursday 23 August 2001 12:59, bvdpoel at uniserve.com wrote:
> Is there a way to signal that the arg for getopt in optional. In C I can
> set an option string to something like:

Sorry, to answer this question directly - I don't believe it's possible in 
the current getopt code. Your best bet would possibly be to locally change 
getopt to do qhat you need (and at the same time, generate a patch that can 
be submitted to python.sf.net).


   Richard




More information about the Python-list mailing list