How to inspect a variable (sys.modules) for changes in the execution of a program?

Mel mwilson at
Tue Feb 15 22:55:24 CET 2011

Emile van Sebille wrote:

> Out of curiosity, if it's immutable, what approach might you try to
> capture/trace reassignment?  I've got a toy tracer that breaks with
> simple assignment:

AFAIK you'd have to replace the namespace dictionaries with dictionary-like 
things that would react to rebinding.


More information about the Python-list mailing list