I use:
I have an environment variable that looks like an absolute path ( /path/to/dir), but I use it to create a git URL. At some point it translates to C:/Program Files/Git/path/to/dir. Python seems to be to blame:
In the git bash shell:
$ export VAR=/path/to/dir
$ echo $VAR
/path/to/dir
$ python
>>> import os
>>> os.environ['VAR']
'C:/Program Files/Git/path/to/dir'
git bash doesn't translate the path, but Python?
At the Windows command prompt, Python does this correctly:
C:\>set VAR=/path/to/dir
C:\>echo %VAR%
/path/to/dir
C:\>python
>>> import os
>>> os.environ['VAR']
'/path/to/dir'
Can anyone explain what is going on here? And how can I prevent translation in a bash shell?
EDIT: , python script OS X Windows, , - , .