diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-01-21 23:00:52 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-01-21 23:00:52 (GMT) |
commit | 815d2bf067799d519323a373387f342ec387645b (patch) | |
tree | e26ebc8bd231b418f77cd4357e7fe9936ecc5ac2 /Mac/Tools/IDE/PyDocSearch.py | |
parent | c71efe01160653e1d232000889fe38f6cf4936c8 (diff) | |
download | cpython-815d2bf067799d519323a373387f342ec387645b.zip cpython-815d2bf067799d519323a373387f342ec387645b.tar.gz cpython-815d2bf067799d519323a373387f342ec387645b.tar.bz2 |
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.
Diffstat (limited to 'Mac/Tools/IDE/PyDocSearch.py')
-rw-r--r-- | Mac/Tools/IDE/PyDocSearch.py | 6 |
1 files changed, 4 insertions, 2 deletions
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 @@ def dosearch(docpath, searchstring, settings): _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 @@ def dosearch(docpath, searchstring, settings): if filehits: hits[fullpath] = filehits finally: - MacOS.EnableAppswitch(-1) + if hasattr(MacOS, 'EnableAppswitch'): + MacOS.EnableAppswitch(-1) status.close() except KeyboardInterrupt: pass |