summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/IDE
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-11-18 15:29:02 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-11-18 15:29:02 (GMT)
commit293fdeb31e664d68d894978c6b85ca97599c1349 (patch)
tree932ce15b92dd0694a6ee58324a26972f62f931a3 /Mac/Tools/IDE
parent972573553e4c323452033cdcb811438ee09220f9 (diff)
downloadcpython-293fdeb31e664d68d894978c6b85ca97599c1349.zip
cpython-293fdeb31e664d68d894978c6b85ca97599c1349.tar.gz
cpython-293fdeb31e664d68d894978c6b85ca97599c1349.tar.bz2
Another workaround, to find the IDE directory when we're in MacPython-OSX
on Jaguar. Ceteram censeam W era packagendam esse.
Diffstat (limited to 'Mac/Tools/IDE')
-rw-r--r--Mac/Tools/IDE/PythonIDE.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Mac/Tools/IDE/PythonIDE.py b/Mac/Tools/IDE/PythonIDE.py
index 7eaf8c7..3a1a66a 100644
--- a/Mac/Tools/IDE/PythonIDE.py
+++ b/Mac/Tools/IDE/PythonIDE.py
@@ -20,6 +20,9 @@ def init():
macresource.need('DITL', 468, "PythonIDE.rsrc")
widgetrespathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE", "Widgets.rsrc"]
widgetresfile = os.path.join(*widgetrespathsegs)
+ if not os.path.exists(widgetresfile):
+ widgetrespathsegs = [os.pardir, "Tools", "IDE", "Widgets.rsrc"]
+ widgetresfile = os.path.join(*widgetrespathsegs)
refno = macresource.need('CURS', 468, widgetresfile)
if os.environ.has_key('PYTHONIDEPATH'):
# For development set this environment variable
@@ -28,6 +31,13 @@ def init():
# We're not a fullblown application
idepathsegs = [sys.exec_prefix, "Mac", "Tools", "IDE"]
ide_path = os.path.join(*idepathsegs)
+ if not os.path.exists(ide_path):
+ idepathsegs = [os.pardir, "Tools", "IDE"]
+ for p in sys.path:
+ ide_path = os.path.join(*([p]+idepathsegs))
+ if os.path.exists(ide_path):
+ break
+
else:
# We are a fully frozen application
ide_path = sys.argv[0]