- Notifications
You must be signed in to change notification settings - Fork 31.7k
/
Copy pathidle.pyw
17 lines (17 loc) · 570 Bytes
/
idle.pyw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
try:
importidlelib.pyshell
exceptImportError:
# IDLE is not installed, but maybe pyshell is on sys.path:
from . importpyshell
importos
idledir=os.path.dirname(os.path.abspath(pyshell.__file__))
ifidledir!=os.getcwd():
# We're not in the IDLE directory, help the subprocess find run.py
pypath=os.environ.get('PYTHONPATH', '')
ifpypath:
os.environ['PYTHONPATH'] =pypath+':'+idledir
else:
os.environ['PYTHONPATH'] =idledir
pyshell.main()
else:
idlelib.pyshell.main()