argparse
0.6.0
  • Creating and using parsers
  • Adding and configuring arguments
  • Adding and configuring options
  • Mutually exclusive groups
  • Adding and configuring commands
  • Default values
  • Callbacks
  • Configuring help and usage messages
  • Miscellaneous
argparse
  • Argparse tutorial
  • View page source

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
  • Configuring help and usage messages
    • Hiding arguments, options, and commands from messages
    • Setting argument placeholder
    • Grouping elements
    • Help message line wrapping
    • Configuring help and usage message layout
  • Miscellaneous
    • Argparse version
    • Overwriting default help option
    • 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 2023 - 2018, Peter Melnichenko.

Built with Sphinx using a theme provided by Read the Docs.