watching mutables?

Fernando Pérez fperez528 at yahoo.com
Fri Sep 27 23:38:11 CEST 2002


Anton Vredegoor wrote:

> But...
> 
> I specifically asked for something that doesn't touch the original
> object. In eventobj.py's docstring there is the following warning:
> 
> <warning>
> Caution : As event management is performed by changing the class of
> the instance, you use eventobj with critical objects at your own
> risk... !
> </warning>
> 
> So, with a lot of thanks for the results sofar ...
> 
> Is it possible?

Well, somehow you have to hook into the object to trap modifications to it, 
no? The other option is via a debugger interface, which works at the bytecode 
level with the interpreter itself. Look into the python debugger (pdb) for 
this. Incidentally, ddd knows how to interface to pdb and can do what you are 
asking about. It's been a long time since I've used it, but I've done exactly 
that with ddd in the past.

Cheers,

f



More information about the Python-list mailing list