At the last ChiPy meeting, Ian Bicking showed a fun little hack to install a doctest output checker from within a running doctest. The hack goes so far as to backtrack through the internal frame stack, locate the doctest frame, change some of its local vars, then switch out a code object with a new one (the func_code attribute). Huzzah!
Take a look at lxml.doctestcompare—scroll to the tempinstall() method. Looks like there might even be a module forthcoming (dtopt?) to aid in this kind of on-the-fly monkey patching madness :)

Re: Hacking python frames
posted by casey on Saturday Dec 11th, 2010 at 9:39a.m.
Hacking is a process where some one get entry to your data base and use your information for his personal use and also will destroy some data of your data base also.
web design charleston sc