I was trying to compile a python plugin (for gimp) using the MSYS shell and
the MINGW compiler.
I now have put this in 'sitecustomize'
$ cat /c/Python24/lib/site-packages/sitecustomize.py
import sys
import os
import re
if os.environ.get("MSYSTEM") == "MINGW32":
os.sep='/'
os.pathsep='/'
sys.prefix = re.sub('\\\\','/',sys.prefix)
sys.exec_prefix = re.sub('\\\\','/',sys.exec_prefix)
It would probably be better to have python detect that it's running from
inside the msys shell,
and output '/'es instead of '\'es.
maybe someone could extend os.path to do this in the standard distribution:
implement an msyspath.py, which calls ntpath for each function, and does a
replace at the end of the evaluation. Unfortunately, I'm just starting to
look into python, so I do not know what the cleanest implementation of this
would be...
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com