]> granicus.if.org Git - python/commitdiff
Fix a bug in Rev 1.10 - Windows can't handle a leading ':' if the
authorKurt B. Kaiser <kbk@shore.net>
Sat, 24 May 2003 21:01:39 +0000 (21:01 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Sat, 24 May 2003 21:01:39 +0000 (21:01 +0000)
user's PYTHONPATH is empty (though Linux can).
Modified Files:
idle idle.py idle.pyw

Lib/idlelib/idle
Lib/idlelib/idle.py
Lib/idlelib/idle.pyw

index 3b08cae2347ee807a7350dc751a5f928aad45469..00a1fe3a00d121300c1e1150427ca629e2d54c5e 100755 (executable)
@@ -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()
index 3b08cae2347ee807a7350dc751a5f928aad45469..00a1fe3a00d121300c1e1150427ca629e2d54c5e 100644 (file)
@@ -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()
index 767db865a558ce7ce9b2116b4b4615492fb7911e..537dd5a9a75462f50f1463fdca315d1f9ba3d47a 100644 (file)
@@ -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()