Just van Rossum | 40f9b7b | 1999-01-30 22:39:17 +0000 | [diff] [blame^] | 1 | # copyright 1996-1999 Just van Rossum, Letterror. just@letterror.com |
| 2 | |
| 3 | # keep this (__main__) as clean as possible, since we are using |
| 4 | # it like the "normal" interpreter. |
| 5 | |
| 6 | __version__ = '1.0b2' |
| 7 | |
| 8 | |
| 9 | def init(): |
| 10 | import MacOS |
| 11 | MacOS.EnableAppswitch(-1) |
| 12 | |
| 13 | import Qd, QuickDraw |
| 14 | Qd.SetCursor(Qd.GetCursor(QuickDraw.watchCursor).data) |
| 15 | |
| 16 | import Res |
| 17 | try: |
| 18 | Res.GetResource('DITL', 468) |
| 19 | except Res.Error: |
| 20 | # we're not an applet |
| 21 | Res.OpenResFile('Widgets.rsrc') |
| 22 | Res.OpenResFile('PythonIDE.rsrc') |
| 23 | else: |
| 24 | # we're an applet |
| 25 | import sys |
| 26 | if sys.argv[0] not in sys.path: |
| 27 | sys.path[2:2] = [sys.argv[0]] |
| 28 | |
| 29 | |
| 30 | init() |
| 31 | del init |
| 32 | |
| 33 | import PythonIDEMain |