[Python-Dev] PEP 389: argparse - new command line parsing module
Steven D'Aprano
steve at pearwood.info
Mon Sep 28 17:27:02 CEST 2009
On Tue, 29 Sep 2009 12:28:39 am Steven Bethard wrote:
> Ok, sounds like there are a number of supporters for keeping getopt
> around and just deprecating optparse. For those who'd like to keep
> getopt around, I have a few questions:
>
> * Would you be opposed to a note in the getopt documentation
> suggesting argparse as an alternative?
+1
> * Would you like argparse to grow an add_getopt_arguments method (as
> in my other post)?
0
> * If argparse grew an add_getopt_arguments, would you still want to
> keep getopt around? And if so, why?
Simplicity of the learning curve. Using it is as simple as:
getopt.getopt(sys.argv[1:], "a:b", ["alpha=", "beta"])
Does argparse allow anything as simple as that?
--
Steven D'Aprano
More information about the Python-Dev
mailing list