Mercurial > cpython-lru_cache-weakref
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Mac/Tools/IDE/PythonIDE.py Thu Jun 21 18:51:11 2001 +0000 @@ -0,0 +1,41 @@ +# copyright 1996-2001 Just van Rossum, Letterror. just@letterror.com + +# keep this (__main__) as clean as possible, since we are using +# it like the "normal" interpreter. + +__version__ = '1.0.1' + + +def init(): + import MacOS + MacOS.EnableAppswitch(-1) + + import Qd, QuickDraw + Qd.SetCursor(Qd.GetCursor(QuickDraw.watchCursor).data) + + import Res, sys, os + try: + Res.GetResource('DITL', 468) + except Res.Error: + # we're not an applet + Res.FSpOpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:PythonIDE.rsrc"), 1) + Res.FSpOpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc"), 1) + ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE") + else: + # we're an applet + try: + Res.GetResource('CURS', 468) + except Res.Error: + Res.FSpOpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc"), 1) + ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE") + else: + # we're a full blown applet + ide_path = sys.argv[0] + if ide_path not in sys.path: + sys.path.insert(0, ide_path) + + +init() +del init + +import PythonIDEMain
