A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-June/054505.html below:

[Python-Dev] using pyhon from the MSYS shell

[Python-Dev] using pyhon from the MSYS shell [Python-Dev] using pyhon from the MSYS shelllode leroy lode_leroy at hotmail.com
Tue Jun 28 11:39:03 CEST 2005
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...


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4