1#!%prefix%/Resources/Python.app/Contents/MacOS/%exe%
2
3import sys, os
4execdir = os.path.dirname(sys.argv[0])
5executable = os.path.join(execdir, "Python")
6resdir = os.path.join(os.path.dirname(execdir), "Resources")
7libdir = os.path.join(os.path.dirname(execdir), "Frameworks")
8mainprogram = os.path.join(resdir, "idlemain.py")
9
10sys.argv.insert(1, mainprogram)
11if 0 or 0:
12    os.environ["PYTHONPATH"] = resdir
13    if 0:
14        os.environ["PYTHONHOME"] = resdir
15else:
16    pypath = os.getenv("PYTHONPATH", "")
17    if pypath:
18        pypath = ":" + pypath
19    os.environ["PYTHONPATH"] = resdir + pypath
20os.environ["PYTHONEXECUTABLE"] = executable
21os.environ["DYLD_LIBRARY_PATH"] = libdir
22os.environ["DYLD_FRAMEWORK_PATH"] = libdir
23os.execve(executable, sys.argv, os.environ)
24