Python Guide - Introduction
What is PyUNO?
LibreOffice has the ability to write macros in several interpreted languages, one of them is Python. PyUNO is the component that gives us access to the application programming interface (API hereinafter by its acronym Application Programming Interface) of LibreOffice with Python.
Test support for Python macros
Open new document Writer. Select menu Tools -> Macro -> Run macros... in this dialog select: Library -> LibreOffice Macros -> HelloWorld, in section Macro Name select: HelloWorldPython and click in command button Run.
If you see this result, your system can run Python macros.