From: Kurt B. Kaiser Date: Sat, 24 May 2003 21:01:39 +0000 (+0000) Subject: Fix a bug in Rev 1.10 - Windows can't handle a leading ':' if the X-Git-Tag: v2.3c1~620 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36364be3bf03589a968c4e3debd0e38c6ff8e93d;p=python 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 b/Lib/idlelib/idle index 3b08cae234..00a1fe3a00 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 3b08cae234..00a1fe3a00 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 767db865a5..537dd5a9a7 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()