Daniele Paganelli wrote:
> I have a problem importing external modules for use in importplugin while
> running the windows compiled exe.
> I need to load the pyodbc module in my import plugin, but any attempt to
> do so will result in Veusz failing to start up without notice.
> Instead, the source version is fine.
As the Veusz binary has its own built-in Python - it doesn't use the system
Python - Veusz can't see any system-installed Python modules. If the modules
are compatible with the Python in the Veusz executable (can't remember
whether it is 2.5 or 2.6 off the top of my head), you could try adding them
onto the path before importing them:
import sys
sys.path.append('c:/PythonXX/....')
Alternatively you could put your import code in an external Python program
and call it from the import plugin using subprocess. You could pickle and
unpickle the data to send it between the programs.
> This exposes also another problem: on windows, if you specify an invalid
> plugin file, veusz won't start up without any message. The only way to
> recover it is to clear the "plugins" registry key.
Thanks - I'll try to fix that for the next release. I'll try to get it to
ignore a plugin if there is an import error.
Jeremy
_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss