Updated for hfsplus module, new gusi libs.
[python/dscho.git] / Mac / Tools / IDE / PythonIDE.py
blob5ebe97afe29229fb63f05f5c3887bba5dfbcf1f1
1 # copyright 1996-2001 Just van Rossum, Letterror. just@letterror.com
3 # keep this (__main__) as clean as possible, since we are using
4 # it like the "normal" interpreter.
6 __version__ = '1.0.1'
9 def init():
10 import MacOS
11 MacOS.EnableAppswitch(-1)
13 from Carbon import Qd, QuickDraw
14 Qd.SetCursor(Qd.GetCursor(QuickDraw.watchCursor).data)
16 import macresource
17 import sys, os
18 macresource.need('DITL', 468, "PythonIDE.rsrc")
19 widgetresfile = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc")
20 refno = macresource.need('CURS', 468, widgetresfile)
21 if refno:
22 # We're not a fullblown application
23 ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE")
24 else:
25 # We are a fully frozen application
26 ide_path = sys.argv[0]
27 if ide_path not in sys.path:
28 sys.path.insert(0, ide_path)
31 init()
32 del init
34 import PythonIDEMain