Intercept methods/raise exception
Steve Purcell
stephen_purcell at yahoo.com
Thu Jul 20 09:51:33 EDT 2000
thomas at c... (Thomas Weholt) wrote:
> >Is there a way to define a method in a class that is called each
time
> >every other method is called in that class, and based on a
attribute,
> >raise an exception or let the method-class go thru?
Check out the Bastion standard library module. Even if you can't use
it directly, the source code will certainly help you.
http://www.python.org/doc/lib/module-Bastion.html
-Steve
--
Steve Purcell, Technical Director, Inkontact
Get in touch at http://www.inkontact.com/
Get testing at http://pyunit.sourceforge.net/
"Life must be simple if I can do it" -- Me
More information about the Python-list
mailing list