application.options Module

Program options.

class wpull.application.options.AppArgumentParser(*args, real_exit=True, **kwargs)[source]

Bases: argparse.ArgumentParser

An Argument Parser that builds up the application options.

classmethod comma_choice_list(string)[source]

Convert a comma separated string to CommaChoiceListArgs.

classmethod comma_list(string)[source]

Convert a comma separated string to list.

exit(status=0, message=None)[source]
classmethod get_argv_encoding(argv)[source]
classmethod int_0_inf(string)[source]

Convert string to int.

If inf is supplied, it returns 0.

classmethod int_bytes(string)[source]

Convert string describing size to int.

parse_args(args=None, namespace=None)[source]
class wpull.application.options.AppHelpFormatter(prog, indent_increment=2, max_help_position=24, width=None)[source]

Bases: argparse.HelpFormatter

class wpull.application.options.CommaChoiceListArgs[source]

Bases: frozenset

Specialized frozenset.

This class overrides the __contains__ function to allow the use of the in operator for ArgumentParser’s choices checking for comma separated lists. The function behaves differently only when the objects compared are CommaChoiceListArgs.