mirror of
https://github.com/python/cpython.git
synced 2025-09-19 15:10:58 +00:00
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
This commit is contained in:
parent
67fd0ea46d
commit
36364be3bf
3 changed files with 12 additions and 3 deletions
|
@ -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', '')
|
||||||
|
if pypath:
|
||||||
os.environ['PYTHONPATH'] = pypath + ':' + idledir
|
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:
|
||||||
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', '')
|
||||||
|
if pypath:
|
||||||
os.environ['PYTHONPATH'] = pypath + ':' + idledir
|
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:
|
||||||
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', '')
|
||||||
|
if pypath:
|
||||||
os.environ['PYTHONPATH'] = pypath + ':' + idledir
|
os.environ['PYTHONPATH'] = pypath + ':' + idledir
|
||||||
|
else:
|
||||||
|
os.environ['PYTHONPATH'] = idledir
|
||||||
PyShell.main()
|
PyShell.main()
|
||||||
else:
|
else:
|
||||||
idlelib.PyShell.main()
|
idlelib.PyShell.main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue