Commit 36364be3 authored by Kurt B. Kaiser's avatar Kurt B. Kaiser

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
parent 67fd0ea4
...@@ -14,7 +14,10 @@ except ImportError: ...@@ -14,7 +14,10 @@ except ImportError:
if idledir != os.getcwd(): if idledir != os.getcwd():
# We're not in the IDLE directory, help the subprocess find run.py # We're not in the IDLE directory, help the subprocess find run.py
pypath = os.environ.get('PYTHONPATH', '') pypath = os.environ.get('PYTHONPATH', '')
os.environ['PYTHONPATH'] = pypath + ':' + idledir if pypath:
os.environ['PYTHONPATH'] = pypath + ':' + idledir
else:
os.environ['PYTHONPATH'] = idledir
PyShell.main() PyShell.main()
else: else:
idlelib.PyShell.main() idlelib.PyShell.main()
...@@ -14,7 +14,10 @@ except ImportError: ...@@ -14,7 +14,10 @@ except ImportError:
if idledir != os.getcwd(): if idledir != os.getcwd():
# We're not in the IDLE directory, help the subprocess find run.py # We're not in the IDLE directory, help the subprocess find run.py
pypath = os.environ.get('PYTHONPATH', '') pypath = os.environ.get('PYTHONPATH', '')
os.environ['PYTHONPATH'] = pypath + ':' + idledir if pypath:
os.environ['PYTHONPATH'] = pypath + ':' + idledir
else:
os.environ['PYTHONPATH'] = idledir
PyShell.main() PyShell.main()
else: else:
idlelib.PyShell.main() idlelib.PyShell.main()
...@@ -12,7 +12,10 @@ except ImportError: ...@@ -12,7 +12,10 @@ except ImportError:
if idledir != os.getcwd(): if idledir != os.getcwd():
# We're not in the IDLE directory, help the subprocess find run.py # We're not in the IDLE directory, help the subprocess find run.py
pypath = os.environ.get('PYTHONPATH', '') pypath = os.environ.get('PYTHONPATH', '')
os.environ['PYTHONPATH'] = pypath + ':' + idledir if pypath:
os.environ['PYTHONPATH'] = pypath + ':' + idledir
else:
os.environ['PYTHONPATH'] = idledir
PyShell.main() PyShell.main()
else: else:
idlelib.PyShell.main() idlelib.PyShell.main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment