mpu.path

Functions for path manipulation and retrieval of files.

mpu.path.get_all_files(root: str, followlinks: bool = False)List[source]

Get all files within the given root directory.

Note that this list is not ordered.

Parameters
  • root (str) – Path to a directory

  • followlinks (bool, optional (default: False)) –

Returns

filepaths – List of absolute paths to files

Return type

List

mpu.path.get_from_package(package_name: str, path: str)str[source]

Get the absolute path to a file in a package.

Parameters
  • package_name (str) – e.g. ‘mpu’

  • path (str) – Path within a package

Returns

filepath

Return type

str