mpas_analysis.shared.io.utility.build_config_full_path

mpas_analysis.shared.io.utility.build_config_full_path(config, section, relativePathOption, relativePathSection=None, defaultPath=None, baseDirectoryOption='baseDirectory')[source]

Get a full path from a base directory and a relative path

Parameters
configMpasAnalysisConfigParser object

configuration from which to read the path

sectionstr

the name of a section in config, which must have an option baseDirectory

relativePathOptionstr

the name of an option in section of the relative path within baseDirectory (or possibly an absolute path)

relativePathSectionstr, optional

the name of a section for relativePathOption if not section

defaultPathstr, optional

the name of a path to return if the resulting path doesn’t exist.

baseDirectoryOptionstr, optional

the name of the option in section for the base directorys

Returns
fullPathstr

The full path to the given relative path within the given baseDirectory