diff --git a/Lib/idlelib/CREDITS.txt b/Lib/idlelib/CREDITS.txt index fd7af95bdea..795dc5e52d4 100644 --- a/Lib/idlelib/CREDITS.txt +++ b/Lib/idlelib/CREDITS.txt @@ -13,15 +13,16 @@ improvements. Besides Guido, the main developers who have been active on IDLEfork version 0.8.1 and later are Stephen M. Gava, who implemented the Configuration GUI, the new configuration system, and the new About menu, and Kurt B. Kaiser, who -completed the integration of the RPC and remote debugger, and made a number of -usability enhancements. +completed the integration of the RPC and remote debugger, implemented the +threaded subprocess, and made a number of usability enhancements. Other contributors include Raymond Hettinger, Tony Lownds (Mac integration), Neal Norwitz (code check and clean-up), and Chui Tey (RPC integration, debugger integration and persistent breakpoints). -Hernan Foffani, Christos Georgiou, Jason Orendorff, Josh Robb, and Bruce -Sherwood have submitted useful patches. Thanks, guys! +Hernan Foffani, Christos Georgiou, Martin v. Loewis, Jason Orendorff, +Noam Raphael, Josh Robb, and Bruce Sherwood have submitted useful patches. +Thanks, guys! There are others who should be included here, especially those who contributed to IDLE versions prior to 0.8, principally Mark Hammond, Jeremy Hylton, diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index d24c34b9242..26c1fda9815 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -7,15 +7,24 @@ What's New in IDLEfork 0.9b1? *Release date: XX-XXX-2003* +- Allow IDLE to run when not installed and cwd is not the IDLE directory + SF Patch 686254 "Run IDLEfork from any directory without set-up" - Raphael + +- When a module is run from an EditorWindow: if its directory is not in + sys.path, prepend it. This allows the module to import other modules in + the same directory. Do the same for a script run from the command line. + - Interrupt the subprocess if it is running when the user attempts to restart the shell, run a module, or exit. - Improved exception reporting when running commands or scripts from the command line. +- Added a -n command line switch to start IDLE without the subprocess. + Removed the Shell menu when running in that mode. Updated help messages. + - Added a comment to the shell startup header to indicate when IDLE is not - using the subprocess. (For now, set PyShell.use_subprocess to False to run - in this mode.) + using the subprocess. - Restore the ability to run without the subprocess. This can be important for some platforms or configurations. (Running without the subprocess allows the diff --git a/Lib/idlelib/idle b/Lib/idlelib/idle index c8a8feaf6ce..449fb0ec90a 100755 --- a/Lib/idlelib/idle +++ b/Lib/idlelib/idle @@ -4,7 +4,17 @@ try: import idlelib.PyShell except ImportError: # IDLE is not installed, but maybe PyShell is on sys.path: - import PyShell - PyShell.main() + try: + import PyShell + except ImportError: + print "Can't locate PyShell.py" + else: + import os + idledir = os.path.dirname(os.path.abspath(PyShell.__file__)) + if idledir != os.getcwd(): + # We're not in the IDLE directory, help the subprocess find run.py + pypath = os.environ.get('PYTHONPATH', '') + os.environ['PYTHONPATH'] = pypath + ':' + idledir + PyShell.main() else: idlelib.PyShell.main() diff --git a/Lib/idlelib/idle.py b/Lib/idlelib/idle.py index c8a8feaf6ce..449fb0ec90a 100644 --- a/Lib/idlelib/idle.py +++ b/Lib/idlelib/idle.py @@ -4,7 +4,17 @@ try: import idlelib.PyShell except ImportError: # IDLE is not installed, but maybe PyShell is on sys.path: - import PyShell - PyShell.main() + try: + import PyShell + except ImportError: + print "Can't locate PyShell.py" + else: + import os + idledir = os.path.dirname(os.path.abspath(PyShell.__file__)) + if idledir != os.getcwd(): + # We're not in the IDLE directory, help the subprocess find run.py + pypath = os.environ.get('PYTHONPATH', '') + os.environ['PYTHONPATH'] = pypath + ':' + idledir + PyShell.main() else: idlelib.PyShell.main() diff --git a/Lib/idlelib/idle.pyw b/Lib/idlelib/idle.pyw index c8a8feaf6ce..2a61720b40f 100644 --- a/Lib/idlelib/idle.pyw +++ b/Lib/idlelib/idle.pyw @@ -1,10 +1,18 @@ -#!/usr/bin/python - try: import idlelib.PyShell except ImportError: # IDLE is not installed, but maybe PyShell is on sys.path: - import PyShell - PyShell.main() + try: + import PyShell + except ImportError: + print "Can't locate PyShell.py" + else: + import os + idledir = os.path.dirname(os.path.abspath(PyShell.__file__)) + if idledir != os.getcwd(): + # We're not in the IDLE directory, help the subprocess find run.py + pypath = os.environ.get('PYTHONPATH', '') + os.environ['PYTHONPATH'] = pypath + ':' + idledir + PyShell.main() else: idlelib.PyShell.main()