blob: b7a3c0430ea5823bd50cbff11f15d2f61fe247f4 [file] [log] [blame]
Ronald Oussoren836b0392006-05-14 19:56:34 +00001import argvemulator
2from idlelib.PyShell import main
3import sys, os
4
5# Make sure sys.executable points to the python interpreter inside the
6# framework, instead of at the helper executable inside the application
7# bundle (the latter works, but doesn't allow access to the window server)
8sys.executable = os.path.join(sys.prefix, 'bin', 'python')
9
10# Look for the -psn argument that the launcher adds and remove it, it will
11# only confuse the IDLE startup code.
12for idx, value in enumerate(sys.argv):
13 if value.startswith('-psn_'):
14 del sys.argv[idx]
15 break
16
17argvemulator.ArgvCollector().mainloop()
18if __name__ == '__main__':
19 main()