UNO connection problems (GSOC Report Week 3)
mst at libreoffice.org
Thu Jun 20 09:01:34 UTC 2019
On 20.06.19 08:52, Stephan Bergmann wrote:
> On 19/06/2019 22:32, Rasmus Jonsson wrote:
>> On Wed, 19 Jun 2019 08:07:15 +0200
>> Stephan Bergmann <sbergman at redhat.com> wrote:
>> This worked, thanks. However, the project requires using whichever
>> LibreOffice installation is available.
> For C++ and Java there is helper functionality in the LO SDK for
> 3rd-party apps to find and access a LO installation, see
> respectively. But I don't think something like that has ever been
> implemented for Python.
there is the program/officehelper.py file, which has a bootstrap
function, which is supposed to be the way to launch soffice from python
- but as you say, it doesn't try to find a LO installation, it expects
the environment to be set up already so that "import uno" works.
but there are basically just 2 different kinds of LO installations:
1) via upstream packaging on all platforms: you always have
instdir/program/python[.exe], so you use that...
2) via some downstream Linux/*BSD/etc. packages: here the distro package
is responsible for putting the officehelper.py and LO's uno module
somewhere so that if you use the distro's default python
installation, using officehelper works out of the box
More information about the LibreOffice