LMIShellOptions Package¶
- class lmi.shell.LMIShellOptions.LMIShellOptionParser(prog=None, usage=None, description=None, epilog=None, version=None, parents=, []formatter_class=<class 'argparse.HelpFormatter'>, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True)¶
Helper class for CLI option parsing.
- error(msg)¶
Prints help message, error message and exits with erro code 2.
- class lmi.shell.LMIShellOptions.LMIShellOptions(argv)¶
Class representing a LMIShell command line options. In the constructor, all command line options before a script name are passed to the LMIShell. First position argument belongs to the script and the rest of command line options is passed to the script run under the LMIShell.
Parameters: argv (list) – CLI arguments - cwd_first_in_path¶
Returns: True, if CWD should be prepended in sys.path; False if appended
- interact¶
Returns: flag, which indicates, if the LMIShell should enter an interactive mode, after executing a provided script. The behavior is similar to python interpreter Return type: bool
- interactive¶
Returns: flag, which tells if the LMIShell should be initially run in the interactive mode Return type: bool
- log¶
Returns: log level Return type: int Log level can be one of the following:
- _LOG_DEFAULT
- _LOG_VERBOSE
- _LOG_MORE_VERBOSE
- _LOG_QUIET
- script_argv¶
Returns: list of command line arguments of the interpreted script
- script_name¶
Returns: script name, which is about to be run under the LMIShell Return type: string
- verify_server_cert¶
Returns: flag, which indicates, if LMIShell should verify server side certificate, if SSL used Return type: bool
- class lmi.shell.LMIShellOptions.LMIShellOptionsHelpWithVersionFormatter(prog, indent_increment=2, max_help_position=24, width=None)¶
Helper class used for help message formatting.