msl.network.utils module

Common functions used by MSL-Network.

msl.network.utils.ensure_root_path(path)[source]

Ensure that the root directory of the file path exists.

Parameters:

path (str) – A file path. For example, if path is /the/path/to/my/test/file.txt then this function would ensure that the /the/path/to/my/test directories exist (creating the intermediate directories if necessary).

msl.network.utils.parse_terminal_input(line)[source]

Parse text from a terminal connection.

See, Connecting from a Terminal for more details.

Parameters:

line (str) – The input text from the terminal.

Returns:

dict – The JSON object.