diff Mac/Tools/IDE/PyDocSearch.py @ 21772:ec750e37671b legacy-trunk

Changes by Donovan Preston (and a few minor ones by me) to make IDE run under MachoPython. Mainly making sure we don't call routines that don't exist and representing pathnames in a os.separator-neutral format. These shouldn't interfere too much with Just's work on the next generation IDE, I hope.
author Jack Jansen <jack.jansen@cwi.nl>
date Mon, 21 Jan 2002 23:00:52 +0000
parents 8905e6725ca1
children ea5ee3e7bfb1
line wrap: on
line diff
--- a/Mac/Tools/IDE/PyDocSearch.py	Mon Jan 21 22:51:55 2002 +0000
+++ b/Mac/Tools/IDE/PyDocSearch.py	Mon Jan 21 23:00:52 2002 +0000
@@ -122,7 +122,8 @@
 	_open = open
 	hits = {}
 	try:
-		MacOS.EnableAppswitch(0)
+		if hasattr(MacOS, 'EnableAppswitch'):
+			MacOS.EnableAppswitch(0)
 		try:
 			for do, name in books:
 				if not do:
@@ -145,7 +146,8 @@
 					if filehits:
 						hits[fullpath] = filehits
 		finally:
-			MacOS.EnableAppswitch(-1)
+			if hasattr(MacOS, 'EnableAppswitch'):
+				MacOS.EnableAppswitch(-1)
 			status.close()
 	except KeyboardInterrupt:
 		pass