PlugIns in their simplest form can be just python modules that are dropped into some designated directory and dynamically loaded by the main application. This snippet can be used to do just that.
Usage
To load plugin modules:
>>> plugins = importPluginModulesIn('mypackage')
>>> plugins
{'foo': <module 'foo' from 'mypackage\foo.py'>, 'bar': <module 'bar' from 'mypackage\bar.py'>}
To access a plugin attribute or method:
>>> plugins['foo'].__name__
'foo'