argparse
0.7.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
Shell completions
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
Setting argument choices
Adding and configuring options
Flags
Control characters
Setting number of consumed arguments
Setting argument choices
Setting number of invocations
Mutually exclusive groups
Adding and configuring commands
Getting name of selected command
Adding elements to commands
Making a command optional
Command summaries
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
Shell completions
Adding a completion option or command
Using completions
Bash
Zsh
Fish
Miscellaneous
Argparse version
Overwriting default help option
Help command
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.
Read the Docs
v: 0.7.0
Versions
latest
stable
0.7.0
0.6.0
0.5.0
0.4.0
Downloads
On Read the Docs
Project Home
Builds
Free document hosting provided by
Read the Docs
.