optparse versus getopt
Robert Kern
robert.kern at gmail.com
Tue Feb 10 16:19:45 EST 2009
On 2009-02-10 15:06, Matthew Sacks wrote:
> does anyone have any arguments against optparse vs getopt
As the getopt docs say: "A more convenient, flexible, and powerful alternative
is the optparse module."
I have found all three statements to be true.
But I've found argparse to be even better. The main reason is that argparse will
help you parse, verify and generate help text for positional arguments in
addition to --options.
http://argparse.python-hosting.com/
http://argparse.python-hosting.com/wiki/ArgparseVsOptparse
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list