summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/IDE
diff options
context:
space:
mode:
authorJust van Rossum <just@lettererror.com>1999-01-31 23:17:56 (GMT)
committerJust van Rossum <just@lettererror.com>1999-01-31 23:17:56 (GMT)
commit99ec5a52b86bd60417de93bda1299bf4d35b687f (patch)
treea7cd2292d36eddb4589f088ae746f56d049a3930 /Mac/Tools/IDE
parenta7a7193363ae5a546f67a74a97d414fc47c91e32 (diff)
downloadcpython-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')
-rw-r--r--Mac/Tools/IDE/PythonIDE.py9
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()