blob: aa75d4cb15e7f2dc95403644a618b1f9c67b78f5 [file] [log] [blame]
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001"""
2Bootstrap script for IDLE as an application bundle.
3"""
4import sys, os
5
6from idlelib.PyShell import main
7
8# Change the current directory the user's home directory, that way we'll get
9# a more useful default location in the open/save dialogs.
10os.chdir(os.path.expanduser('~/Documents'))
11
12
13# Make sure sys.executable points to the python interpreter inside the
14# framework, instead of at the helper executable inside the application
15# bundle (the latter works, but doesn't allow access to the window server)
16sys.executable = os.path.join(sys.prefix, 'bin', 'python')
17
18# Look for the -psn argument that the launcher adds and remove it, it will
19# only confuse the IDLE startup code.
20for idx, value in enumerate(sys.argv):
21 if value.startswith('-psn_'):
22 del sys.argv[idx]
23 break
24
25#argvemulator.ArgvCollector().mainloop()
26if __name__ == '__main__':
27 main()