carputils
Doxygen code documentation for the python framework controlling openCARP
Classes | Functions | Variables
carputils.cli Namespace Reference

Some argparse extensions implementing custom behaviors for carputils. More...

Classes

class  CallbacksMixin
 
class  CarputilsArgumentParser
 
class  GroupAccessMixin
 

Functions

def bool (string)
 Bool checker for use as ArgumentParser type. More...
 
def time_tuple (string)
 Time tuple converter for use as ArgumentParser type. More...
 
def range_tuple (string)
 Range tuple converter for use as ArgumentParser type. More...
 
def bitflags_callback (choices)
 Set up a callback to convert provided options into an integer value. More...
 

Variables

tuple POSTPROCESS_MODES
 

Detailed Description

Some argparse extensions implementing custom behaviors for carputils.

Function Documentation

◆ bitflags_callback()

def carputils.cli.bitflags_callback (   choices)

Set up a callback to convert provided options into an integer value.

Parameters

choices list or dict The strings that may be used as command line arguments - if a dict, the strings must be the keys and the values the corresponding integer values

  • if a list, they will be mapped to powers of 2 in order

Returns

callable A function which can be passed as the callback argument of CarputilsArgumentParser.add_argument().

◆ bool()

def carputils.cli.bool (   string)

Bool checker for use as ArgumentParser type.

◆ range_tuple()

def carputils.cli.range_tuple (   string)

Range tuple converter for use as ArgumentParser type.

◆ time_tuple()

def carputils.cli.time_tuple (   string)

Time tuple converter for use as ArgumentParser type.

Variable Documentation

◆ POSTPROCESS_MODES

tuple carputils.cli.POSTPROCESS_MODES
Initial value:
1 = ('phie', 'optic', 'activation',
2  'axial', 'filament',
3  'efield', 'mechanics')