summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2003-05-17 03:15:48 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2003-05-17 03:15:48 (GMT)
commita80d57c41dfcfd7ae2b45b4987b28fe47ffa9dfd (patch)
tree70c7bae5672309307f713f215f94c4799077b2ca /Lib
parentab0053aa13951ad00a00c29467cc6b106725630b (diff)
downloadcpython-a80d57c41dfcfd7ae2b45b4987b28fe47ffa9dfd.zip
cpython-a80d57c41dfcfd7ae2b45b4987b28fe47ffa9dfd.tar.gz
cpython-a80d57c41dfcfd7ae2b45b4987b28fe47ffa9dfd.tar.bz2
Noam Raphael's patch.
SF Patch 686254 "Run IDLEfork from any directory without set-up" Allows IDLE to run when not installed and cwd is not the IDLE directory. I took the liberty of moving it to the startup scripts since once IDLEfork is again a part of Python it will be superfluous and I don't want it to be forgotten. But it is very useful for those using IDLEfork standalone! M CREDITS.txt M NEWS.txt M idle M idle.py M idle.pyw
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/CREDITS.txt9
-rw-r--r--Lib/idlelib/NEWS.txt13
-rwxr-xr-xLib/idlelib/idle14
-rw-r--r--Lib/idlelib/idle.py14
-rw-r--r--Lib/idlelib/idle.pyw16
5 files changed, 52 insertions, 14 deletions
diff --git a/Lib/idlelib/CREDITS.txt b/Lib/idlelib/CREDITS.txt
index fd7af95..795dc5e 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 d24c34b9..26c1fda 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 c8a8fea..449fb0e 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 c8a8fea..449fb0e 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 c8a8fea..2a61720 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()