mlrl.testbed.util.io module

Author Michael Rapp (michael.rapp.ml@gmail.com)

Provides utility functions for reading and writing files.

mlrl.testbed.util.io.open_readable_file(file_path: Path)

Opens a file to be read from.

Parameters:

file_path – The path to the file to be opened

Returns:

The file that has been opened

mlrl.testbed.util.io.open_writable_file(file_path: Path, append: bool = False)

Opens a file to be written to.

Parameters:
  • file_path – The path to the file to be opened

  • append – True, if new data should be appended to the file, if it already exists, False otherwise

Returns:

The file that has been opened