proxy objects and call-stack depend globals
![](https://secure.gravatar.com/avatar/4ab216eb1f5bdc9b9b2b7d855de1ef92.jpg?s=120&d=mm&r=g)
May 25, 2009
8:23 a.m.
Hi, for testing and dealing with thread-depend stdout/stderr redirection (__so__ helpfull for embedded debug consoles in gui apps), i wrote a simple lib to create global proxy objects which may point to different objects depending on the context of the call stack. The whole thing is based on a simple proxy implementation taken from werkzeug and a context managers to handle the current context of that global. I extracted the proxying bits to a base class I'ts availiable at http://pypi.python.org/pypi/pyscope and http://bitbucket.org/RonnyPfannschmidt/pyscope/overview/ Im hoping for some input on how to do it better and if something along that lines would be a usefull extension to the stdlib. Regards Ronny Pfannschmidt
5746
Age (days ago)
5746
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ronny Pfannschmidt