diff options
author | Just van Rossum <just@lettererror.com> | 1999-01-31 23:17:56 (GMT) |
---|---|---|
committer | Just van Rossum <just@lettererror.com> | 1999-01-31 23:17:56 (GMT) |
commit | 99ec5a52b86bd60417de93bda1299bf4d35b687f (patch) | |
tree | a7cd2292d36eddb4589f088ae746f56d049a3930 /Mac/Tools/IDE/PythonIDE.py | |
parent | a7a7193363ae5a546f67a74a97d414fc47c91e32 (diff) | |
download | cpython-99ec5a52b86bd60417de93bda1299bf4d35b687f.zip cpython-99ec5a52b86bd60417de93bda1299bf4d35b687f.tar.gz cpython-99ec5a52b86bd60417de93bda1299bf4d35b687f.tar.bz2 |
Add $(APPLICATION) or :Mac:Tools:IDE at the very start of sys.path to improve startup time -- jvr
Diffstat (limited to 'Mac/Tools/IDE/PythonIDE.py')
-rw-r--r-- | Mac/Tools/IDE/PythonIDE.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Mac/Tools/IDE/PythonIDE.py b/Mac/Tools/IDE/PythonIDE.py index 90b7496..7f4fa49 100644 --- a/Mac/Tools/IDE/PythonIDE.py +++ b/Mac/Tools/IDE/PythonIDE.py @@ -20,18 +20,19 @@ def init(): # we're not an applet Res.OpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:PythonIDE.rsrc")) Res.OpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc")) - sys.path.append(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE")) + 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.OpenResFile(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE:Widgets.rsrc")) - sys.path.append(os.path.join(sys.exec_prefix, ":Mac:Tools:IDE")) + ide_path = os.path.join(sys.exec_prefix, ":Mac:Tools:IDE") else: # we're a full blown applet - if sys.argv[0] not in sys.path: - sys.path[2:2] = [sys.argv[0]] + ide_path = sys.argv[0] + if ide_path not in sys.path: + sys.path.insert(0, ide_path) init() |