Mercurial > cpython-lru_cache-weakref
annotate 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 |
| rev | line source |
|---|---|
|
18201
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
1 # copyright 1996-2001 Just van Rossum, Letterror. just@letterror.com |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
2 |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
3 # keep this (__main__) as clean as possible, since we are using |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
4 # it like the "normal" interpreter. |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
5 |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
6 __version__ = '1.0.1' |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
7 |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
8 |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
9 def init(): |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
10 import MacOS |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
11 MacOS.EnableAppswitch(-1) |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
12 |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
13 import Qd, QuickDraw |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
14 Qd.SetCursor(Qd.GetCursor(QuickDraw.watchCursor).data) |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
15 |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
16 import Res, sys, os |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
17 try: |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
18 Res.GetResource('DITL', 468) |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
19 except Res.Error: |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
20 # we're not an applet |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
21 Res.FSpOpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:PythonIDE.rsrc"), 1) |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
22 Res.FSpOpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc"), 1) |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
23 ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE") |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
24 else: |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
25 # we're an applet |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
26 try: |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
27 Res.GetResource('CURS', 468) |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
28 except Res.Error: |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
29 Res.FSpOpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc"), 1) |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
30 ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE") |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
31 else: |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
32 # we're a full blown applet |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
33 ide_path = sys.argv[0] |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
34 if ide_path not in sys.path: |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
35 sys.path.insert(0, ide_path) |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
36 |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
37 |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
38 init() |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
39 del init |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
40 |
|
58736ca9143c
This commit was manufactured by cvs2svn to create branch
cvs2svn <tools@python.org>
parents:
diff
changeset
|
41 import PythonIDEMain |
