Re: Injecting code into a function



> 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

.



Relevant Pages

  • Re: OT: Severe storm images
    ... > Had an interesting afternoon that I thought I would share in a photo essay. ... It's strange how that hailstone landed right in the middle of that leaf like ... Prev by Date: ...
    (sci.geo.geology)
  • Re: Jennifer Hagel Smith Interview
    ... >> her physical condition that made a shower necessary or advisable. ... > Jen and George were *drinking hard*. ... It just struck me as really strange the way she said "they ... And she was, what's the term?, disassociating from the event, in shock. ...
    (alt.true-crime)
  • Re: Jennifer Hagel Smith Interview
    ... >>> Maybe they thought a shower might do her some good. ... > This is very strange. ... Jen and George were *drinking hard*. ... possessions, hers and George's, were there on the dock. ...
    (alt.true-crime)
  • Re: one more cosmetic pitcher or stadium, and shell tamely irritate everybody
    ... They are learning alongside wet, above noisy, outside ... Pat lift that? ... whilst George eerily kills them too. ... Mitch, near coconuts sad and strange, solves for it, improving ...
    (uk.sport.football.clubs.liverpool)
  • Re: HELP! RECENTLY ADDED ISSUES!
    ... of successes between you and George sure seem to indicate you have come up ... Very strange and very interesting. ... since I knew that I'd need to look into my D:\Steves\Audio folder ...
    (microsoft.public.windowsmedia.player)