cmd_args module¶
This module contains code for
configuring commandline argument support and
related argparse actions.
- class lib.cmd_args.NumberFilterAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)¶
An
argparse.Actionsubclass that validates the number filters. Accepts inputs like<x,= xor>=x, wherexis an integer.Ignores a space in the middle.
- Raises
ValueError – if an incorrect format is provided
- class lib.cmd_args.ReadableDirectoryAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)¶
An
argparse.Actionsubclass that checks if a directory is readable.- Raises
ArgumentTypeError – if a path is invalid
ArgumentTypeError – if a directory is unreadable
- lib.cmd_args.configure_parser()¶
Configures
argparseto accept arguments needed by thetagnetutility like “path”, “output_file”, “mode”, “filter”, etc.