python-fhs
Python module for using the FHS and XDG basedir paths.
Loading...
Searching...
No Matches

◆ option()

fhs.option (   name,
  help,
  short = None,
  multiple = False,
  optional = False,
  default = None,
  noarg = None,
  argtype = None,
  module = None,
  options = None,
  option_order = None 
)

Register commandline argument.

Parameters
nameName of the option argument. Should not include the "--" prefix.
helpHelp text when displaying the –help output.
multipleIf True, this option may be specified multiple times and the value will be a list of the arguments.
optionalIf True, this option's argument may be omitted.
defaultDefault value of this argument. This is used if the option is not passed and multiple is False.
noargDefault value when option is passed without argument. This is ignored unless optional is True.
argtypeType of the argument. If this is None and a default is given, type(default) is used. If default is None, str is used. If argtype is bool, no argument is allowed and default, noarg default to False, True. This type is called to construct the value. It can also be used as a callback.

Definition at line 448 of file fhs.py.

Here is the call graph for this function:
Here is the caller graph for this function: