Argparse

From XPUB & Lens-Based wiki
Revision as of 13:39, 26 October 2011 by Michael Murtaugh (talk | contribs) (Created page with "In Python, using the argparse (formerly optparse) module is an easy way to create commandline programs that are flexible, and behave like other "big" programs. When using argpars...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In Python, using the argparse (formerly optparse) module is an easy way to create commandline programs that are flexible, and behave like other "big" programs. When using argparse, options can appear in any order, before or after positional arguments. Argparse also automatically produces a "help" screen for explaining (reminding) how a script can be used.