pylab_ml.common.environment.environ_getpath
- environ_getpath(self, key)[source]
Get the value of an environment variable and adjust it for network paths on Windows if necessary.
eg. If the environment variable ‘DATA_PATH’ is set to ‘/data’ and the ‘NETWORK’ environment variable is set to ‘\samba’, then on Windows, this function will return ‘\sambadata’ instead of ‘/data’.
- Parameters:
key (str) – The name of the environment variable to retrieve.
- Returns:
result : The value of the environment variable, adjusted for network paths on Windows if necessary. Returns None if the environment variable is not found.
- Return type:
str or None