blob: ace3950dfa88e18e212037e7f35d6b669a1c688f [file] [log] [blame]
Ronald Oussoren836b0392006-05-14 19:56:34 +00001import argvemulator
2from idlelib.PyShell import main
3import sys, os
4
Tim Peterscbd7b752006-05-16 23:22:20 +00005# Make sure sys.executable points to the python interpreter inside the
Ronald Oussoren836b0392006-05-14 19:56:34 +00006# 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__':
Tim Peterscbd7b752006-05-16 23:22:20 +000019 main()