summaryrefslogtreecommitdiff
path: root/Lib/idlelib/idle.pyw
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
commitb100dc18cd997df8d2f946008d80c6e774080598 (patch)
tree412fb06b38aaed18b1031a63b9ab6a5c9e979fd1 /Lib/idlelib/idle.pyw
parente7e6fc50155d269e7889b16921bcf65364d3fb08 (diff)
downloadcpython-b100dc18cd997df8d2f946008d80c6e774080598.tar.gz
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.pyw')
-rw-r--r--Lib/idlelib/idle.pyw9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/idlelib/idle.pyw b/Lib/idlelib/idle.pyw
index 8638a165b4..131e8d3694 100644
--- a/Lib/idlelib/idle.pyw
+++ b/Lib/idlelib/idle.pyw
@@ -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()