On Fri, 3 Nov 2000, Aaron Optimizer Digulla wrote:

> James, can you have a look, please ? I have one of these in the
> program I'm currently working on and it's impossible to find :-(
> (no, it's not in timeout_add()).

I encountered a similar problem sometimes ago, and was able to trace it
back using the sys.settrace function.

I do not have kept the trace function I used back then, since I reused the
file to match other degugging chores in the meantime. The one I have right
now in my directory looks like :

def trace(frame,event,arg):
    if event == 'call' and frame.f_lineno == 49 and frame.f_code.co_name
== '__i
nit__' :
        i = 0
        f = frame
        while f and i<20:
            i = i+1
            co = f.f_code
            print co.co_filename,co.co_name,co.co_firstlineno
            f = f.f_back
    return trace


sys.settrace(trace)

Maybe you can adapt the test at the beginning to suit your need.


Alexandre Fayolle
-- 
http://www.logilab.com 
Narval is the first software agent available as free software (GPL).
LOGILAB, Paris (France).


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to