Managing resources (files, filenames, copy, memory)¶
Created on 30 Aug. 2017
- Authord:
Lafaysse
This module contains all file manipulations.
- exception utils.resources.InstallException(issue)[source]¶
Bases:
Exception
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- utils.resources.absolute_path(pathin)[source]¶
Convert a local path in an absolute path.
The input may be a list of coma-separated paths
- utils.resources.check_snowtools_install()[source]¶
Check the snowtools installation. More precisely :
Check that the required folders for a simulation are present in the folder pointed by SNOWTOOLS_CEN
Check the snowtools packages are correctly importable
- utils.resources.check_surfex_exe(path)[source]¶
Check that SURFEX inaries are present and return their path
- Parameters:
path – The path to look in. If one, fallback to environment variable EXESURFEX.
- Returns:
The path for surfex binaries
- Raises:
BaseException if no path provided or FileNameException if binaries not found