LMIConsole¶
- class lmi.shell.LMIConsole.LMIConsole(cwd_first_in_path=False)¶
Class representing an interactive console.
- clear_history()¶
Clears the current history.
- interact(locals=None)¶
Starts the interactive mode.
Parameters: locals (dictionary) – locals
- interpret(script_name, script_argv, locals=None, interactive=False)¶
Interprets a specified script within additional provided locals. There are LMIConsole.DEFAULT_LOCALS present.
Parameters: - script_name (string) – script name
- script_argv (list) – script CLI arguments
- locals (dictionary) – dictionary with locals
- interactive (bool) – tells LMIShell, if the script should be treated as if it was run in interactive mode
Returns: exit code of the script
Return type: int
- load_history()¶
Loads the shell’s history from the history file.
- save_history()¶
Saves current history of commands into the history file. If the length of history exceeds a maximum history file length, the history will be truncated.
- set_verify_server_certificate(verify_server_cert=True)¶
Turns on or off server side certificate verification, if SSL used.
Parameters: verify_server_cert (bool) – – flag which tells, whether a server side certificate needs to be verified, if SSL used
- setup_completer()¶
Initializes tab-completer.