home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 June / PCWorld_2005-06_cd.bin / software / vyzkuste / firewally / firewally.exe / framework-2.3.exe / idle < prev    next >
Text File  |  2003-12-30  |  683b  |  24 lines

  1. #!/usr/bin/python
  2.  
  3. try:
  4.     import idlelib.PyShell
  5. except ImportError:
  6.     # IDLE is not installed, but maybe PyShell is on sys.path:
  7.     try:
  8.         import PyShell
  9.     except ImportError:
  10.         raise
  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.             if pypath:
  18.                 os.environ['PYTHONPATH'] = pypath + ':' + idledir
  19.             else:
  20.                 os.environ['PYTHONPATH'] = idledir
  21.         PyShell.main()
  22. else:
  23.     idlelib.PyShell.main()
  24.