Pre-method and post-method call hooks?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Pre-method and post-method call hooks?

Brad Byrd
Other than just modifying the source (in methodbinding.cs?) and doing it myself, is there an easy way to globally hook methods so that I can do something immediately before and after a method invocation from Python?  For example, I'd like to acquire/release a lock or check if some subsystem is started up, and I'd be a lot cleaner to do it in one place instead of at the top/bottom of every single public function that I expose to Python.

Thanks,

Brad...

_________________________________________________
Python.NET mailing list - [hidden email]
http://mail.python.org/mailman/listinfo/pythondotnet