On Wed, Jul 6, 2016 at 2:04 PM, Lawrence D’Oliveiro <lawrenced...@gmail.com> wrote: > On Tuesday, July 5, 2016 at 1:42:42 AM UTC+12, Chris Angelico wrote: > >> The getopt module is designed to match the C getopt function, which I've >> never used; for my command-line parsing, I use argparse instead >> (usually via some wrapper that cuts down the duplication, like clize). > > getopt seems so much simpler.
Look at clize: https://github.com/Rosuav/LetMeKnow/blob/master/letmeknow.py I just put docstrings on my functions, slap "@command" above them, and with minimal boilerplate, I have a fully-working command line interface. It's a wrapper around argparse. ChrisA -- https://mail.python.org/mailman/listinfo/python-list