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
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to