Skip to content

argparse 0.6.0

Latest
Compare
Choose a tag to compare
@mpeterv mpeterv released this 13 Apr 19:17

New features:

  • An array of functions can now be as the value of convert property,
    so that multi-argument options can use different conversion rules
    for different arguments (#14).
  • Mutexes can now include positional arguments (#11).
  • Added hidden property for arguments, options and commands,
    removing them from the autogenerated usage and help strings.
  • Added :group(name, ...) method to Parser and Command objects, allowing
    custom grouping of arguments, options, and commands in autogenerated
    help string.
  • Added help_vertical_space property for configuring number of extra
    newlines between help strings for different arguments and options in
    autogenerated help string.
  • Added usage_margin and usage_max_width properties for configuring
    usage string autogeneration.
  • Added help_usage_margin and help_description_margin properties
    for configuring help string autogeneration.
  • Added help_max_width property. If set, descriptions in help string
    are automatically wrapped to fit into given number of columns.
  • Argparse version is now available as argparse.version.

Improvements:

  • -- can now be used as a normal option name, with arguments
    after -- always passed to it verbatim (#17).
  • When generating help messages for options with arguments and multiple
    aliases, usage strings for different aliases are put on separate lines and
    vertically aligned (#15).