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.
diff --git a/Mac/Tools/IDE/PyDocSearch.py b/Mac/Tools/IDE/PyDocSearch.py
index 208870e..98eced9 100644
--- a/Mac/Tools/IDE/PyDocSearch.py
+++ b/Mac/Tools/IDE/PyDocSearch.py
@@ -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