sys.settrace for all threads

Duncan Grisby duncan-news at grisby.org
Sat Oct 5 18:35:18 CEST 2002


In article <8a6ba1da.0210041339.323e22e3 at posting.google.com>,
 Richie Hindle <richie at entrian.com> wrote:

>sys.settrace sets the trace function for the current thread.  What I'd
>like is a way of setting it for all threads.  I've written a code
>coverage module, which a friend is trying to run with his omniORBpy
>server (Hi Alik!).  The server is multithreaded, with each thread
>being started by omniORBpy, so there's no convenient place for him to
>install the coverage module's trace function for the threads.

omniORBpy has a hook you can use specifically for this purpose. Look
at the omniORB.addWThreadHook() function, defined in
omniORB/__init__.py.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the Python-list mailing list