Hi Christian, all,
On 09/04/12 11:28, Christian Lohmaier wrote:
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?
If I was doing this for just me then I would use the LO Python, but for other
users that could be a problem. I wouldn't call myself a naive user and it took
me a little while to find out how to make it work. I want to write a module that
will work when the user opens up a terminal and runs 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)
Thanks for that, I didn't know about mdfind. I think that might be a better way
to do it than the way that unoconv does it. Just need to figure out how to drive
it from Python.
Cheers
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.