Mercurial > cpython-lru_cache-weakref
comparison Mac/Tools/IDE/PythonIDE.py @ 18201:58736ca9143c 2.1
This commit was manufactured by cvs2svn to create branch
'release21-maint'.
| author | cvs2svn <tools@python.org> |
|---|---|
| date | Thu, 21 Jun 2001 18:51:11 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 18147:2ce70a883af6 | 18201:58736ca9143c |
|---|---|
| 1 # copyright 1996-2001 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.0.1' | |
| 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, sys, os | |
| 17 try: | |
| 18 Res.GetResource('DITL', 468) | |
| 19 except Res.Error: | |
| 20 # we're not an applet | |
| 21 Res.FSpOpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:PythonIDE.rsrc"), 1) | |
| 22 Res.FSpOpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc"), 1) | |
| 23 ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE") | |
| 24 else: | |
| 25 # we're an applet | |
| 26 try: | |
| 27 Res.GetResource('CURS', 468) | |
| 28 except Res.Error: | |
| 29 Res.FSpOpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc"), 1) | |
| 30 ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE") | |
| 31 else: | |
| 32 # we're a full blown applet | |
| 33 ide_path = sys.argv[0] | |
| 34 if ide_path not in sys.path: | |
| 35 sys.path.insert(0, ide_path) | |
| 36 | |
| 37 | |
| 38 init() | |
| 39 del init | |
| 40 | |
| 41 import PythonIDEMain |
