Python Notes and Examples

Parsing Args

Although the Python std lib comes with getopt and argparse (optparse is deprecated, superseded by argparse), try:

  • docopt lets you write the usage pattern (the “help/usage message”), and it figures out how to parse the args for that.
  • For something fancier, see Click.

For command line programs in general, see also Clint.