a better getopt than getopt.py?

Carel Fellinger cfelling at iae.nl
Tue Feb 20 14:17:54 CET 2001


Sean 'Shaleh' Perry <shaleh at valinux.com> wrote:
> Writing my fisrt real python app that people will run from the command line
> (most of my previous coding has been modules for other software to web stuff)
> I decided to use getopt.  My setup looks like this:

...example code snipped

> this means I have my options defined twice and then once again in the USAGE
> output.  Is there not a better way to handle arguments?

Well you could make a class that hides all of this:) Sometime ago
(1999 me thinks) some people (including me) exchanged some ideas and
example code for this on c.l.py.  Though looking back at my own code,
I think I would do things differently now that I've more experience
with Python, but if you're interested I don't mind sending it.
-- 
groetjes, carel



More information about the Python-list mailing list