DiFfRG.file_io.paths#

Functions#

mkdir(path)

Creates a directory if it does not exist.

get_parameters_from_name(→ dict)

Extracts the parameters encoded in a DiFfRG output file name.

Module Contents#

DiFfRG.file_io.paths.mkdir(path: str)#

Creates a directory if it does not exist.

Parameters:

path (str) – The path to the directory to be created.

DiFfRG.file_io.paths.get_parameters_from_name(name: str) → dict#

Extracts the parameters encoded in a DiFfRG output file name.

Parameters:

name (str) – The file name, e.g. “sim_T:0.1_muq:0.3.pvd”.

Returns:

The parameter names and their values.

Return type:

dict