Fixing subtle bug in expanduser(expandvars(path)) on Windows....
Fixing subtle bug in expanduser(expandvars(path)) on Windows.
On Windows, some paths can have the string $\ in them:
\\server\users$\%username%.
The "$" means it is a hidden share. Unfortunately, os.path.expandvars
turns that into:
\\server\users\%username% (it deletes the '$').
I have implemented a simple function (expand_path) that calls
os.expanduser and os.expandvars in a way that preserves th '$' on
Windows in this case.