0
0
mirror of https://github.com/python/cpython.git synced 2024-11-24 08:52:25 +01:00
cpython/Mac/IDLE/IDLE.app/Contents/MacOS/IDLE
2009-02-12 15:01:44 +00:00

24 lines
771 B
Plaintext
Executable File

#!%prefix%/Resources/Python.app/Contents/MacOS/%exe%
import sys, os
execdir = os.path.dirname(sys.argv[0])
executable = os.path.join(execdir, "Python")
resdir = os.path.join(os.path.dirname(execdir), "Resources")
libdir = os.path.join(os.path.dirname(execdir), "Frameworks")
mainprogram = os.path.join(resdir, "idlemain.py")
sys.argv.insert(1, mainprogram)
if 0 or 0:
os.environ["PYTHONPATH"] = resdir
if 0:
os.environ["PYTHONHOME"] = resdir
else:
pypath = os.getenv("PYTHONPATH", "")
if pypath:
pypath = ":" + pypath
os.environ["PYTHONPATH"] = resdir + pypath
os.environ["PYTHONEXECUTABLE"] = executable
os.environ["DYLD_LIBRARY_PATH"] = libdir
os.environ["DYLD_FRAMEWORK_PATH"] = libdir
os.execve(executable, sys.argv, os.environ)