fastwater.general.fileTools module¶
Generic file manipulation tools.
- fastwater.general.fileTools.generateGlobalAttributes(titleStr)[source]¶
Generate a generic global attributes dictionary for adding meta data to a data dictionary.
- fastwater.general.fileTools.getListOfFiles(filePath, searchStr='')[source]¶
Get a list of file from a directory based on a search string.
- fastwater.general.fileTools.loadMatFile(fileName)[source]¶
Load a matlab data structure from an *.mat file.
- fastwater.general.fileTools.loadmat(filename)[source]¶
this function should be called instead of direct spio.loadmat as it cures the problem of not properly recovering python dictionaries from mat files. It calls the function check keys to cure all entries which are still mat-objects
from: StackOverflow
- fastwater.general.fileTools.mat2dict(fileName)[source]¶
Load an *.mat file into a dictionary structure
- fastwater.general.fileTools.print_mat_nested(d, indent=0)[source]¶
Pretty print nested structures from .mat files Inspired by: StackOverflow