idle.py 400 B

1234567891011
  1. import os.path
  2. import sys
  3. # If we are working on a development version of IDLE, we need to prepend the
  4. # parent of this idlelib dir to sys.path. Otherwise, importing idlelib gets
  5. # the version installed with the Python used to call this module:
  6. idlelib_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  7. sys.path.insert(0, idlelib_dir)
  8. import idlelib.PyShell
  9. idlelib.PyShell.main()