File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ except ImportError:
1414 if idledir != os .getcwd ():
1515 # We're not in the IDLE directory, help the subprocess find run.py
1616 pypath = os .environ .get ('PYTHONPATH' , '' )
17- os .environ ['PYTHONPATH' ] = pypath + ':' + idledir
17+ if pypath :
18+ os .environ ['PYTHONPATH' ] = pypath + ':' + idledir
19+ else :
20+ os .environ ['PYTHONPATH' ] = idledir
1821 PyShell .main ()
1922else :
2023 idlelib .PyShell .main ()
Original file line number Diff line number Diff line change 1414 if idledir != os .getcwd ():
1515 # We're not in the IDLE directory, help the subprocess find run.py
1616 pypath = os .environ .get ('PYTHONPATH' , '' )
17- os .environ ['PYTHONPATH' ] = pypath + ':' + idledir
17+ if pypath :
18+ os .environ ['PYTHONPATH' ] = pypath + ':' + idledir
19+ else :
20+ os .environ ['PYTHONPATH' ] = idledir
1821 PyShell .main ()
1922else :
2023 idlelib .PyShell .main ()
Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ except ImportError:
1212 if idledir != os .getcwd ():
1313 # We're not in the IDLE directory, help the subprocess find run.py
1414 pypath = os .environ .get ('PYTHONPATH' , '' )
15- os .environ ['PYTHONPATH' ] = pypath + ':' + idledir
15+ if pypath :
16+ os .environ ['PYTHONPATH' ] = pypath + ':' + idledir
17+ else :
18+ os .environ ['PYTHONPATH' ] = idledir
1619 PyShell .main ()
1720else :
1821 idlelib .PyShell .main ()
You can’t perform that action at this time.
0 commit comments