source: vendor/python/2.5/Mac/IDLE/idlemain.py

Last change on this file was 3225, checked in by bird, 18 years ago

Python 2.5

File size: 876 bytes
Line 
1"""
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()
Note: See TracBrowser for help on using the repository browser.