Stick the
from TestModule import TestFunction
into the run method
(the module will be in sys.path only during invocation of run, not during adding the plugin, etc.) and dont worry about run_plugins_on_import, in this case it is used automatically.
Also just so you know, the next release of calibre will automatically handle the case of plugins with compiled code as well as plugins with only python code.
|