3 from pyaspects.weaver import weave_class_method
5 from PLC.Method import Method
6 from aspects.omfaspects import OMFAspect
10 def apply_omf_aspect():
11 # track all PLC methods to add OMF hooks
12 weave_class_method(OMFAspect(), Method, "__call__")
15 def apply_debugger_aspect():
16 # just log all method calls w/ their parameters
17 from pyaspects.debuggeraspect import DebuggerAspect
18 weave_class_method(DebuggerAspect(out=open("/tmp/all_method_calls.log", "a")), Method, "__call__")