coalispr.resources.cmd_parser

Attributes

Functions

get_descriptions([no_test, no_prog])

Fot each command give details to construct argument parsers and gui

make_parser(comms, version)

Assemble the parser for coalispr CLI.

Module Contents

coalispr.resources.cmd_parser.prog = ''
coalispr.resources.cmd_parser.get_descriptions(no_test=False, no_prog=False)

Fot each command give details to construct argument parsers and gui interfaces. Note that values can be an <object> (like for ‘formatter’, ‘type’, ‘comms’), not only strings or lists of ints:

name = {
    'name': ,
    'description': ,
    'usage': ,
    'help': ,
    'formatter': ,
    'comm': ,
    'required':[
        {'label': ("dest", "arg"), # for gui
        'input': {['main', 'type']: [(button -v, comm -v), (button -h, comm -h,), (logo)],
            ['combobox','str']: preset, #'entry2': [preset1, connector, preset2],
            ['optionmenu_combobox', 'type'] : [choices if len(choices >=2)],
            ['checkbutton', 'type']: [choices if choices == [0,1]; Yes/No; True/False],
            },
        'arg': , 'type': , 'choices': ,
        'dest': , 'default': ,
        'help': },
        ]
    'optional': [
        {'label': ("dest", "arg"), # for gui
        'input': {['main', 'type']: [(button -v, comm -v), (button -h, comm -h,), (logo)],
            ['combobox','str']: preset, #'entry2': [preset1, connector, preset2],
            ['optionmenu_combobox', 'type'] : [choices if len(choices >=2)],
            ['checkbutton', 'type']: [choices if choices == [0,1]; Yes/No; True/False],
            },
        'arg': , 'type': , 'choices': ,
        'dest': , 'default': ,
        'help': },
        ]
    }
coalispr.resources.cmd_parser.make_parser(comms, version)

Assemble the parser for coalispr CLI.

Parameters:
  • comms (dict) – Dictionary of commands.

  • version (str) – The __version__ string from calling module.