Mercurial > cpython-lru_cache-weakref
comparison Mac/Tools/IDE/PythonIDE.py @ 10050:66858fdf467e legacy-trunk
Add $(APPLICATION) or :Mac:Tools:IDE at the very start of sys.path to improve startup time -- jvr
| author | Just van Rossum <just@lettererror.com> |
|---|---|
| date | Sun, 31 Jan 1999 23:17:56 +0000 |
| parents | dce104e1a73b |
| children | 90c752ae44a6 |
comparison
equal
deleted
inserted
replaced
| 10049:dce104e1a73b | 10050:66858fdf467e |
|---|---|
| 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.OpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:PythonIDE.rsrc")) |
| 22 Res.OpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc")) | 22 Res.OpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc")) |
| 23 sys.path.append(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.OpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc")) |
| 30 sys.path.append(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 if sys.argv[0] not in sys.path: | 33 ide_path = sys.argv[0] |
| 34 sys.path[2:2] = [sys.argv[0]] | 34 if ide_path not in sys.path: |
| 35 sys.path.insert(0, ide_path) | |
| 35 | 36 |
| 36 | 37 |
| 37 init() | 38 init() |
| 38 del init | 39 del init |
| 39 | 40 |
