Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi Glenn, *,

On Fri, Apr 6, 2012 at 10:32 PM, Glenn Ramsey
<glenn.ramsey@slidespeech.com> wrote:
[...]
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.

But why do you want to run system python when LO on Mac comes with its
own python?

It is much easier to just call your script with the python
wrapper-script that sets the environment variables and uses LO's
python than to hook up to a different python from the system's python.

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.

I'd try to just look in /Applications for the LibreOffice.app - and
failing that, try to use mdfind - if that also fails, give up and ask
the user to manually specify the installation path/show a filepicker.

Using mdfind and fallick back to asking the user is what the Language
pack installer does (via applescript).

See 
http://opengrok.libreoffice.org/xref/core/setup_native/scripts/osx_install_languagepack.applescript

(in the actual languagepack installer It is packaged as a
shell-executable-bundle that uses osascript to run the script, as
"applescript-apps" cannot do any UI interaction, thus this little
detour)

ciao
Christian

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.