Fix a bug in Rev 1.10 - Windows can't handle a leading ':' if the
user's PYTHONPATH is empty (though Linux can).
Modified Files:
idle idle.py idle.pyw
diff --git a/Lib/idlelib/idle.pyw b/Lib/idlelib/idle.pyw
index 767db86..537dd5a 100644
--- a/Lib/idlelib/idle.pyw
+++ b/Lib/idlelib/idle.pyw
@@ -12,7 +12,10 @@
if idledir != os.getcwd():
# We're not in the IDLE directory, help the subprocess find run.py
pypath = os.environ.get('PYTHONPATH', '')
- os.environ['PYTHONPATH'] = pypath + ':' + idledir
+ if pypath:
+ os.environ['PYTHONPATH'] = pypath + ':' + idledir
+ else:
+ os.environ['PYTHONPATH'] = idledir
PyShell.main()
else:
idlelib.PyShell.main()