Index: src/orca/util.py
===================================================================
--- src/orca/util.py	(revision 2095)
+++ src/orca/util.py	(working copy)
@@ -1556,38 +1556,3 @@
     obj.lastSelections = []
     for i in range(0, obj.text.getNSelections()):
         obj.lastSelections.append(obj.text.getSelection(i))
-
-# The following code has been borrowed from the following URL:
-#
-# http://www.dalkescientific.com/writings/diary/archive/2005/04/20/tracing_python_code.html
-#
-import linecache
-
-def traceit(frame, event, arg):
-    """Line tracing utility to output all lines as they are executed by
-    the interpreter.  This is to be used by sys.settrace and is for
-    debugging purposes.
-
-    Arguments:
-    - frame: is the current stack frame
-    - event: 'call', 'line', 'return', 'exception', 'c_call', 'c_return',
-             or 'c_exception'
-    - arg:   depends on the event type (see docs for sys.settrace)
-    """
-
-    if event == "line":
-        lineno = frame.f_lineno
-        filename = frame.f_globals["__file__"]
-        if (filename.endswith(".pyc") or
-            filename.endswith(".pyo")):
-            filename = filename[:-1]
-        name = frame.f_globals["__name__"]
-        if name == "gettext" \
-           or name == "locale" \
-           or name == "posixpath" \
-           or name == "UserDict":
-            return traceit
-        line = linecache.getline(filename, lineno)
-        debug.println(debug.LEVEL_ALL,
-                      "TRACE %s:%s: %s" % (name, lineno, line.rstrip()))
-    return traceit
Index: src/orca/orca_prefs.py
===================================================================
--- src/orca/orca_prefs.py	(revision 2095)
+++ src/orca/orca_prefs.py	(working copy)
@@ -99,8 +99,8 @@
 
     prefs.writelines("if False:\n")
     prefs.writelines("    import sys\n")
-    prefs.writelines("    import orca.util\n")
-    prefs.writelines("    sys.settrace(orca.util.traceit)\n")
+    prefs.writelines("    import orca.debug\n")
+    prefs.writelines("    sys.settrace(orca.debug.traceit)\n")
     prefs.writelines("    orca.debug.debugLevel = orca.debug.LEVEL_ALL\n")
     prefs.writelines("\n")
 
Index: src/orca/debug.py
===================================================================
--- src/orca/debug.py	(revision 2095)
+++ src/orca/debug.py	(working copy)
@@ -207,3 +207,37 @@
 
     if level >= debugLevel and accessible:
         println(level, accessible.toString(indent, includeApp))
+
+# The following code has been borrowed from the following URL:
+# 
+# http://www.dalkescientific.com/writings/diary/archive/2005/04/20/tracing_python_code.html
+#
+import linecache
+
+def traceit(frame, event, arg):
+    """Line tracing utility to output all lines as they are executed by
+    the interpreter.  This is to be used by sys.settrace and is for 
+    debugging purposes.
+   
+    Arguments:
+    - frame: is the current stack frame
+    - event: 'call', 'line', 'return', 'exception', 'c_call', 'c_return',
+             or 'c_exception'
+    - arg:   depends on the event type (see docs for sys.settrace)
+    """ 
+
+    if event == "line":
+        lineno = frame.f_lineno
+        filename = frame.f_globals["__file__"]
+        if (filename.endswith(".pyc") or
+            filename.endswith(".pyo")):
+            filename = filename[:-1]
+        name = frame.f_globals["__name__"]
+        if name == "gettext" \
+           or name == "locale" \
+           or name == "posixpath" \
+           or name == "UserDict":
+            return traceit
+        line = linecache.getline(filename, lineno)
+        println(LEVEL_ALL, "TRACE %s:%s: %s" % (name, lineno, line.rstrip()))
+    return traceit
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 2095)
+++ ChangeLog	(working copy)
@@ -1,3 +1,15 @@
+2007-03-05  Rich Burridge <rich.burridge@sun.com>
+
+        * src/orca/debug.py:
+          src/orca/orca_prefs.py:
+          src/orca/util.py:
+          Partial fix for bug #395548.  Move routines out of util.py and 
+          (mostly) into default.py and adjust the code that uses them.
+
+          Moved:
+          def traceit(frame, event, arg):
+          (in this case into debug.py).
+
 2007-03-04  Willie Walker <william.walker@sun.com>
 
 	* src/orca/Gecko.py, src/orca/default.py, src/orca/flat_review.py:
