|
Open Source Aspect-Oriented Frameworks in Python
aspects.py library provides means to intercept function calls. Functions and methods (also in Python standard library and third party code) can be wrapped so that when they are called, the wrap is invoked first. Depending on the wrap, the execution of the original function can be omitted, or the function can be called arbitrarily many times. Wraps are able to modify the arguments and the return value of the original function. In the terminology of aspect-oriented programming, the library allows applying advices (wraps) to call join points of methods and functions in around fashion.
|
Go To Aspects.py
aspects is a python module that enables Aspect Oriented Programming in Python. For now, it provides a set of ready-to-use aspects and an easy way to create your own aspects. The current possibilities are still a bit limited, but it will soon provide a more exhaustive way to define and use more complex aspects.
|
Go To logilab-aspects
AOPython is an AOP (Aspect Oriented Programming) module for Python. AOPython provides a base Aspect that can advise or wrap function and/or method calls. It also contains a weave function that can weave (apply advice to a subset of- or all functions and methods in) a module, class, or instance. Advice may modify or replace parameters and/or the return value of the advised function or method each time it is called. It can do many other things such as handle exceptions raised by an advised function, collect information on the method call (logging), or obtain and release resources before and after a method is invoked. |
Go To AOPython
|
|