summaryrefslogtreecommitdiffstats
path: root/Mac/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Tools')
-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()