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
  • config (MpasAnalysisConfigParser object) – configuration from which to read the path

  • section (str) – the name of a section in config, which must have an option baseDirectory

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

  • relativePathSection (str, optional) – the name of a section for relativePathOption if not section

  • defaultPath (str, optional) – the name of a path to return if the resulting path doesn’t exist.

  • baseDirectoryOption (str, optional) – the name of the option in section for the base directorys

Returns

fullPath (str) – The full path to the given relative path within the given baseDirectory