Mercurial > cpython-lru_cache-weakref
diff Mac/Tools/IDE/PythonIDE.py @ 26269:6b556c545ffb legacy-trunk
Another workaround, to find the IDE directory when we're in MacPython-OSX
on Jaguar.
Ceteram censeam W era packagendam esse.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Mon, 18 Nov 2002 15:29:02 +0000 |
| parents | 4c4f92b0af90 |
| children | 5d4d4ebfd317 |
line wrap: on
line diff
--- a/Mac/Tools/IDE/PythonIDE.py Mon Nov 18 15:26:43 2002 +0000 +++ b/Mac/Tools/IDE/PythonIDE.py Mon Nov 18 15:29:02 2002 +0000 @@ -20,6 +20,9 @@ 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 @@ # 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]
