[Python-Dev] PEP 389: argparse - new command line parsing module (original) (raw)
skip at pobox.com skip at pobox.com
Tue Sep 29 13:48:36 CEST 2009
- Previous message: [Python-Dev] PEP 389: argparse - new command line parsing module
- Next message: [Python-Dev] PEP 389: argparse - new command line parsing module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Martin> alpha = None
Martin> beta = False
Martin> options, args = getopt.getopt(sys.argv[1:],"a:b",['alpha=','beta']):
Martin> for opt, val in options:
...
Martin> Even though this is many more lines, I prefer it over
Martin> optparse/argparse: this code has only a single function call,
...
Agreed. I have never completely wrapped my brain around optparse. Getopt I just remember.
Skip
- Previous message: [Python-Dev] PEP 389: argparse - new command line parsing module
- Next message: [Python-Dev] PEP 389: argparse - new command line parsing module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]