nacx/kahuna — pull request #13 by jdevesa (2012-05-01 14:27:01+00:00)
Title: 'with-statement' to encapsulate plugin calls.

'with-statement' together with contextlib utilities let
us to define a context that encapsulates any plugin call
and avoid try-finally statements in each method of the
plugin.

pluginmanager class, before to call the plugins, intializes
the context via 'with' statement and sets its context calling
the method load_context of the AbsPlugin class.

All the plugins inherit from AbsPlugin and have already the
context loaded when start its execution -> less work for
plugin developers.

There are also some cosmetic fixes in 'machine' plugin.

If you consider to merge this into the main branch,
more info here:
* http://effbot.org/zone/python-with-statement.htm
* http://docs.python.org/library/contextlib.html

Also feel free to rename or move any module!