Mercurial > cpython-lru_cache-weakref
comparison Mac/Tools/IDE/PythonIDE.py @ 10314:90c752ae44a6 legacy-trunk
open res file(s) read only; upped __version__ -- jvr
| author | Just van Rossum <just@lettererror.com> |
|---|---|
| date | Fri, 26 Feb 1999 21:19:50 +0000 |
| parents | 66858fdf467e |
| children | bc085660dbc1 |
comparison
equal
deleted
inserted
replaced
| 10313:fa18b0fc0c18 | 10314:90c752ae44a6 |
|---|---|
| 1 # copyright 1996-1999 Just van Rossum, Letterror. just@letterror.com | 1 # copyright 1996-1999 Just van Rossum, Letterror. just@letterror.com |
| 2 | 2 |
| 3 # keep this (__main__) as clean as possible, since we are using | 3 # keep this (__main__) as clean as possible, since we are using |
| 4 # it like the "normal" interpreter. | 4 # it like the "normal" interpreter. |
| 5 | 5 |
| 6 __version__ = '1.0b2' | 6 __version__ = '1.0b3' |
| 7 | 7 |
| 8 | 8 |
| 9 def init(): | 9 def init(): |
| 10 import MacOS | 10 import MacOS |
| 11 MacOS.EnableAppswitch(-1) | 11 MacOS.EnableAppswitch(-1) |
| 16 import Res, sys, os | 16 import Res, sys, os |
| 17 try: | 17 try: |
| 18 Res.GetResource('DITL', 468) | 18 Res.GetResource('DITL', 468) |
| 19 except Res.Error: | 19 except Res.Error: |
| 20 # we're not an applet | 20 # we're not an applet |
| 21 Res.OpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:PythonIDE.rsrc")) | 21 Res.FSpOpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:PythonIDE.rsrc"), 1) |
| 22 Res.OpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc")) | 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") | 23 ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE") |
| 24 else: | 24 else: |
| 25 # we're an applet | 25 # we're an applet |
| 26 try: | 26 try: |
| 27 Res.GetResource('CURS', 468) | 27 Res.GetResource('CURS', 468) |
| 28 except Res.Error: | 28 except Res.Error: |
| 29 Res.OpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc")) | 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") | 30 ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE") |
| 31 else: | 31 else: |
| 32 # we're a full blown applet | 32 # we're a full blown applet |
| 33 ide_path = sys.argv[0] | 33 ide_path = sys.argv[0] |
| 34 if ide_path not in sys.path: | 34 if ide_path not in sys.path: |
