ats_utilities.option package

Module contents

Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> ats_utilities is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ats_utilities is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ATSOptionParser with attribute(s) and method(s). Created option parser and argument processor.
class ats_utilities.option.ATSOptionParser(version, epilog, description, verbose=False)[source]

Bases: object

Defined class ATSOptionParser with attribute(s) and method(s). Created option parser and argument processor.

It defines:

attributes:
__verbose - enable/disable verbose option.
__opt_parser - options parser.
methods:
__init__ - initial constructor.
add_operation - add option to ATS.
parse_args - process arguments from start.
__str__ - str dunder method for ATSOptionParser.
VERBOSE = 'ats_utilities::option'
add_operation(*args, **kwargs)[source]

Add option to ATS.

Parameters:
  • args (<list>) – list of arguments (objects).
  • kwargs (<dict>) – arguments in shape of dictionary.
Exceptions:

None

parse_args(arguments, verbose=False)[source]

Process arguments from start.

Parameters:
  • arguments (<list>) – arguments.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

namespace object.

Return type:

<argparse.Namespace>

Exceptions:

None