pylab_ml.common.environment.replaceEnvs
- replaceEnvs(dictionary, network='')[source]
Recursively replace environment variables in a dictionary with their values.
eg. If the dictionary is {‘path’: ‘$NETWORK_PATH’} and the ‘NETWORK_PATH’ environment variable is set to ‘//samba’, then this function will replace ‘$NETWORK_PATH’ with ‘//samba’ in the dictionary, resulting in {‘path’: ‘//samba’}.
- Parameters:
dictionary (dict) – The dictionary in which to replace environment variables.
network (str, optional) – The network path to prepend if the path is a network path on Windows. Defaults to ‘’.
- Returns:
The dictionary with environment variables replaced by their values.
- Return type:
dict