Hi,
How can I use my own python module in extensions?
When I include it in the addin package the standard python import fails ('no module named ..').
Most examples I found only use one python file and that containing multiple files use a complicated method to set the system path new but I couldn't figure out how this works.
I didn't find anything in the PyUNO wiki.
[Solved] Including python modules in extensions
[Solved] Including python modules in extensions
Last edited by Hagar Delest on Sat Apr 02, 2016 2:12 pm, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
LibreOffice 5.0.2.2 on Windows 7
Re: Including python modules in extensions
Just put your modules in the pythonpath folder of your extension.
In main.py:
In your extension, it looks like this:
In main.py:
Code: Select all
import mypackage
import mymodule
Code: Select all
main.py
/pythonpath/
/pythonpath/mypackage/
/pythonpath/mymodule.py
LibreOffice 6.4 • Windows 10
Re: Including python modules in extensions
Hi,
Thanks a lot!
I knew it must be something easy.
Thanks a lot!
I knew it must be something easy.
LibreOffice 5.0.2.2 on Windows 7