Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you install or activate PyUno in LibreOffice?

How do you make Python (any Python) know about PyUno in LibreOffice?

When I do:

import uno

python says that it knows no module "uno". (This question came up re. this question.)

like image 802
Prof. Falken Avatar asked Oct 16 '11 13:10

Prof. Falken


People also ask

How do I program LibreOffice with Python?

Open a new document in Writer. Select menu Tools ▸ Macros ▸ Run macro..., the "Macro Selector" dialog appears. In the Library section select LibreOffice Macros ▸ HelloWorld, in the Macro Name section select HelloWorldPython, and click button Run. If you see this result, your system can run Python macros.

What is Python uno?

Introduction. The Python-UNO bridge allows to. use the standard OpenOffice.org API from the well known python scripting language. to develop UNO components in python, thus python UNO components may be run within the OpenOffice.org process and can be called from Java, C++ or the built in StarBasic scripting language.


2 Answers

(UPDATING for 2014's)

Perhaps the most used UNO application is document conversion... For this task, in nowadays, you not need UNO, you can use directly

libreoffice --convert-to

About UNO itself, see the new home page, http://api.libreoffice.org/

A good example of using python3-uno (or python-uno) is the Docvert conversor (Docvert for py2).

like image 148
Peter Krauss Avatar answered Sep 24 '22 23:09

Peter Krauss


As said in the response to your comment there: it's an optional installable component for OpenOffice. See the Introduction to Python on OOo page in OpenOffice's Wiki for installation details

like image 33
jro Avatar answered Sep 23 '22 23:09

jro