argparse
0.5.0
  • Creating and using parsers
  • Adding and configuring arguments
  • Adding and configuring options
  • Mutually exclusive groups
  • Adding and configuring commands
  • Default values
  • Callbacks
  • Miscellaneous
argparse
  • Docs »
  • Argparse tutorial
  • Edit on GitHub

Argparse tutorialΒΆ

Contents:

  • Creating and using parsers
    • Parsing command line arguments
      • Error handling
      • Help option
      • Typo autocorrection
    • Configuring parsers
  • Adding and configuring arguments
    • Setting number of consumed arguments
  • Adding and configuring options
    • Flags
    • Control characters
    • Setting number of consumed arguments
    • Setting number of invocations
  • Mutually exclusive groups
  • Adding and configuring commands
    • Getting name of selected command
    • Adding elements to commands
    • Making a command optional
  • Default values
    • Default mode
  • Callbacks
    • Converters
      • Table converters
    • Actions
      • Argument and option actions
      • Built-in actions
      • Command actions
  • Miscellaneous
    • Generating and overwriting help and usage messages
    • Overwriting default help option
    • Setting argument placeholder
    • Disabling option handling
    • Prohibiting overuse of options
    • Parsing algorithm
    • Property lists
      • Parser properties
      • Command properties
      • Argument properties
      • Option and flag properties

This is a tutorial for argparse, a feature-rich command line parser for Lua.

Next

© Copyright 2013 - 2015, Peter Melnichenko. Revision a40458fd.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: 0.5.0
Versions
latest
stable
0.5.0
0.4.1
0.4.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.