| Line | |
|---|
| 1 | """
|
|---|
| 2 | Bootstrap script for IDLE as an application bundle.
|
|---|
| 3 | """
|
|---|
| 4 | import sys, os
|
|---|
| 5 |
|
|---|
| 6 | from 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.
|
|---|
| 10 | os.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)
|
|---|
| 16 | sys.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.
|
|---|
| 20 | for idx, value in enumerate(sys.argv):
|
|---|
| 21 | if value.startswith('-psn_'):
|
|---|
| 22 | del sys.argv[idx]
|
|---|
| 23 | break
|
|---|
| 24 |
|
|---|
| 25 | #argvemulator.ArgvCollector().mainloop()
|
|---|
| 26 | if __name__ == '__main__':
|
|---|
| 27 | main()
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.