blob: b7a3c0430ea5823bd50cbff11f15d2f61fe247f4 [file] [log] [blame]
import argvemulator
from idlelib.PyShell import main
import sys, os
# Make sure sys.executable points to the python interpreter inside the
# framework, instead of at the helper executable inside the application
# bundle (the latter works, but doesn't allow access to the window server)
sys.executable = os.path.join(sys.prefix, 'bin', 'python')
# Look for the -psn argument that the launcher adds and remove it, it will
# only confuse the IDLE startup code.
for idx, value in enumerate(sys.argv):
if value.startswith('-psn_'):
del sys.argv[idx]
break
argvemulator.ArgvCollector().mainloop()
if __name__ == '__main__':
main()