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.


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
Returns:True, if CWD should be prepended in sys.path; False if appended
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
Returns:flag, which tells if the LMIShell should be initially run in the interactive mode
Return type:bool
Returns:log level
Return type:int

Log level can be one of the following:

Returns:list of command line arguments of the interpreted script
Returns:script name, which is about to be run under the LMIShell
Return type:string
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.