From f4f427681507371f70ef904a248420ef15dba2a8 Mon Sep 17 00:00:00 2001 From: "Kurt B. Kaiser" Date: Tue, 24 Dec 2002 06:36:19 +0000 Subject: 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. --- Lib/idlelib/idle.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Lib/idlelib/idle.py') diff --git a/Lib/idlelib/idle.py b/Lib/idlelib/idle.py index 8638a165b4..131e8d3694 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() -- cgit v1.2.1