blob: 449fb0ec90ae6567858a56da200c8ec0ee17d500 [file] [log] [blame]
Kurt B. Kaiser7cca3d82002-12-31 23:18:00 +00001#!/usr/bin/python
David Scherer7aced172000-08-15 01:13:23 +00002
Kurt B. Kaiserf4f42762002-12-24 06:36:19 +00003try:
4 import idlelib.PyShell
Kurt B. Kaiser7cca3d82002-12-31 23:18:00 +00005except ImportError:
Kurt B. Kaiserf4f42762002-12-24 06:36:19 +00006 # IDLE is not installed, but maybe PyShell is on sys.path:
Kurt B. Kaisera80d57c2003-05-17 03:15:48 +00007 try:
8 import PyShell
9 except ImportError:
10 print "Can't locate PyShell.py"
11 else:
12 import os
13 idledir = os.path.dirname(os.path.abspath(PyShell.__file__))
14 if idledir != os.getcwd():
15 # We're not in the IDLE directory, help the subprocess find run.py
16 pypath = os.environ.get('PYTHONPATH', '')
17 os.environ['PYTHONPATH'] = pypath + ':' + idledir
18 PyShell.main()
Kurt B. Kaisere23ca3c2003-01-02 17:09:34 +000019else:
20 idlelib.PyShell.main()