pylab_ml.common.environment.checkNetworkPath

checkNetworkPath(name, network='')[source]

Check if the given path name is a network path on Windows and adjust it if necessary.

eg. If name is ‘/data’ and the ‘NETWORK’ environment variable is set to ‘\samba’, then on Windows, this function will return ‘\sambadata’ instead of ‘/data’.

Parameters:
  • name (str) – The path name to check and adjust if necessary.

  • network (str, optional) – The network path to prepend if the path is a network path on Windows. Defaults to ‘’.

Returns:

name : The adjusted path name.

Return type:

str