witten
/
luminotes
Archived
1
0
Fork 0
This repository has been archived on 2023-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
luminotes/plugins/Invoke.py

10 lines
283 B
Python

import imp
import plugins
def invoke( plugin_type, plugin_name, *args, **kwargs ):
plugin_name = u"%s_%s" % ( plugin_type, plugin_name )
plugin_module = getattr( plugins, plugin_name )
function = getattr( plugin_module, plugin_type )
return apply( function, args, kwargs )