1 from pyaspects.weaver import weave_class_method
3 from PLC.Method import Method
4 from aspects.ratelimitaspects import RateLimitAspect
6 def apply_ratelimit_aspect():
7 weave_class_method(RateLimitAspect(), Method, "__call__")
9 def apply_debugger_aspect():
10 # just log all method calls w/ their parameters
11 from pyaspects.debuggeraspect import DebuggerAspect
12 weave_class_method(DebuggerAspect(out=open("/tmp/all_method_calls.log", "a")), Method, "__call__")