On Fri, Apr 6, 2012 at 10:09 PM, Glenn Ramsey
<glenn.ramsey@slidespeech.com>wrote:
On Fri, Apr 6, 2012 at 7:32 PM, Miklos Vajna <vmiklos@suse.cz> wrote:
On Fri, Apr 06, 2012 at 09:05:29AM +1200, Glenn Ramsey <
glenn.ramsey@slidespeech.com> wrote:
with OOoPython on the command line (in OSX 10.6) I discovered that the
PYTHONPATH needs to be set up properly before uno can be successfully
imported.
Is there a way to automatically set this up, or do I have to write
something in my script to discover and configure the path? I would like
this to work on Linux, Windows and OSX.
I just checked the Linux RPM's, there program/python file is a shell
script setting up PYTHONPATH and friends, then the real python binary is
called python.bin. Maybe you missed this. :)
No, I hadn't checked that, thanks for the tip. On Debian based systems I
think it also works out of the box. I tested Windows 7 today and that too
works without any further effort. So it looks like it is just OSX that
requires additional configuration.
In order for a system python script to be able to execute lo-python it
needs to know where LO is installed and what platform it is running on. I
hacked up code that does this on Windows by looking in the registry for
soffice.exe, but before I start implementing it for other platforms I
thought I should check that I'm not reinventing the wheel. Does anyone know
of some code that already does this? It doesn't have to be in Python.
Glenn
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.