[Python.NET] Pre-method and post-method call hooks?

Brad Byrd bbyrd at blizzard.com
Mon Mar 28 19:53:17 CEST 2011


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...



More information about the PythonDotNet mailing list