> Oh, I overlooked this. Then the solution becomes simple: > > sys._getframe().f_trace > > Test: > > >>> an = Analyzer() > >>> sys.settrace(an.trace_returns) > >>> sys._getframe().f_trace > <bound method Analyzer.trace_returns of <__main__.Analyzer instance at > 0x010015D0>>
Does this work for you non-interactively ? I tried running it from a script or importing it from a module but it returns None. Very strange... George -- http://mail.python.org/mailman/listinfo/python-list