Changeset 391 for python/trunk/Lib/idlelib/idle.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/idlelib/idle.py
r2 r391 1 try: 2 import idlelib.PyShell 3 except ImportError: 4 # IDLE is not installed, but maybe PyShell is on sys.path: 5 try: 6 import PyShell 7 except ImportError: 8 raise 9 else: 10 import os 11 idledir = os.path.dirname(os.path.abspath(PyShell.__file__)) 12 if idledir != os.getcwd(): 13 # We're not in the IDLE directory, help the subprocess find run.py 14 pypath = os.environ.get('PYTHONPATH', '') 15 if pypath: 16 os.environ['PYTHONPATH'] = pypath + ':' + idledir 17 else: 18 os.environ['PYTHONPATH'] = idledir 19 PyShell.main() 20 else: 21 idlelib.PyShell.main() 1 import os.path 2 import sys 3 4 # If we are working on a development version of IDLE, we need to prepend the 5 # parent of this idlelib dir to sys.path. Otherwise, importing idlelib gets 6 # the version installed with the Python used to call this module: 7 idlelib_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 8 sys.path.insert(0, idlelib_dir) 9 10 import idlelib.PyShell 11 idlelib.PyShell.main()
Note:
See TracChangeset
for help on using the changeset viewer.