[getopt-sig] Re: ANNOUNCE: getopt-sig created

Elliot Lee sopwith@redhat.com
Thu, 14 Feb 2002 11:14:33 -0500 (EST)


On Tue, 12 Feb 2002, Greg Ward wrote:

> If you just want to state an opinion (eg. "Optik rules", "Optik sucks",
> "Russ' idea looks good to me"), please post it to getopt-sig@python.org
> -- you don't have to join the list to do that.

Optik sucks. Use python-popt.

(hey, you asked :)

popt is a C library that is used by rpm, gnome, etc. for the same purpose.  
There is a python-popt module used by some of the RH python utilities.

I'm pretty certain that nothing else out there can match the maturity and
feature set of popt. While I don't doubt Gregory's intentions, and I can
see pythonisms that make Optik uniquely suited to python, I don't see any
way for Optik to reflect the aggregate experience that has polished popt
into The Best For C Programs (and at least half-decent for Python ones :).

I am less certain that python would want to add a mandatory dependency on
a C library that is not installed by default on many of the systems python
supports.

If it were up to me, I would just keep getopt.py (which I personally
happen to use for my python programs that don't need complex cmdline
processing), and add poptmodule in to be built only if libpopt is
available.

Note of warning, whatever you do, stay away from glibc's argp routines....
-- Elliot
The early bird may get the worm, but the second mouse gets the cheese.