pycgtool.__main__
¶
Module Contents¶
Classes¶
Set up a boolean argparse argument with matching –no argument. |
Functions¶
|
|
|
Check that arguments are not contradictory and modify where necessary. |
|
Attributes¶
-
pycgtool.__main__.
PathLike
¶
-
pycgtool.__main__.
logger
¶
-
exception
pycgtool.__main__.
ArgumentValidationError
[source]¶ Bases:
ValueError
Exception raised for invalid combinations of command line arguments.
-
class
pycgtool.__main__.
PyCGTOOL
(config)[source]¶ -
get_output_filepath
(self, ext: PathLike) → pathlib.Path[source]¶ Get file path for an output file by extension.
Creates the output directory if missing.
-
apply_mapping
(self, in_frame: pycgtool.frame.Frame) → Tuple[pycgtool.mapping.Mapping, pycgtool.frame.Frame][source]¶ Map input frame to output using requested mapping file.
-
-
class
pycgtool.__main__.
BooleanAction
(option_strings, dest, nargs=None, **kwargs)[source]¶ Bases:
argparse.Action
Set up a boolean argparse argument with matching –no argument.
Based on https://thisdataguy.com/2017/07/03/no-options-with-argparse-and-python/