aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/idlelib/idle.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2002-12-24 06:36:19 +0000
committerKurt B. Kaiser <kbk@shore.net>2002-12-24 06:36:19 +0000
commitf4f427681507371f70ef904a248420ef15dba2a8 (patch)
tree147b87610fef611eb57db81a4a34c49781c45ab7 /Lib/idlelib/idle.py
parent12bf339aea9c787f7ce655d613b8898f7511c7db (diff)
downloadcpython-f4f427681507371f70ef904a248420ef15dba2a8.tar.gz
cpython-f4f427681507371f70ef904a248420ef15dba2a8.zip
M PyShell.py
M idle M idle.py M idle.pyw M setup.py Switch back to installing IDLE as a package. The IDLE GUI and the subprocess will both attempt to start up via the package mechanism, but if IDLE is not yet installed it is possible to run by calling python idle.py in the IDLE source directory, or to add the source directory to sys.path. One advantage of doing it this way is IDLE stays off sys.path. Developed in collaboration with Tony Lownds.
Diffstat (limited to 'Lib/idlelib/idle.py')
-rw-r--r--Lib/idlelib/idle.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/idlelib/idle.py b/Lib/idlelib/idle.py
index 8638a165b4b..131e8d3694a 100644
--- a/Lib/idlelib/idle.py
+++ b/Lib/idlelib/idle.py
@@ -1,4 +1,9 @@
#! /usr/bin/env python
-import PyShell
-PyShell.main()
+try:
+ import idlelib.PyShell
+ idlelib.PyShell.main()
+except:
+ # IDLE is not installed, but maybe PyShell is on sys.path:
+ import PyShell
+ PyShell.main()