diff options
-rwxr-xr-x | Lib/idlelib/idle | 5 | ||||
-rw-r--r-- | Lib/idlelib/idle.py | 5 | ||||
-rw-r--r-- | Lib/idlelib/idle.pyw | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/Lib/idlelib/idle b/Lib/idlelib/idle index 3b08cae..00a1fe3 100755 --- a/Lib/idlelib/idle +++ b/Lib/idlelib/idle @@ -14,7 +14,10 @@ except ImportError: 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() diff --git a/Lib/idlelib/idle.py b/Lib/idlelib/idle.py index 3b08cae..00a1fe3 100644 --- a/Lib/idlelib/idle.py +++ b/Lib/idlelib/idle.py @@ -14,7 +14,10 @@ except ImportError: 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() 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 @@ except ImportError: 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() |