Ajuda del LibreOffice 7.2
The Python script files are stored in the filesystem, in folders controlled by LibreOffice. The macros can be started at installation, user or file level.
Refer to Getting Session Information in order to get programmatic access to Python script locations.
El programa d'instal·lació ha col·locat les macros existents a aquesta ubicació (contenidor). Estan disponibles per a tots els usuaris de l'ordinador, i qualsevol document obert pot accedir-hi. Us calen privilegis administratius per a emmagatzemar o modificar macros a aquesta ubicació.
La ubicació del contenidor Macros del LibreOffice al sistema de fitxers depèn del sistema operatiu:
En el Windows: ${Instal·lació}\share\Scripts\python.
En el Linux i el macOS: ${Instal·lació}/share/Scripts/python.
This container is accessible only by the LibreOffice user. Any open document can access macros stored the container. Macros in this location are stored in the LibreOffice user profile.
La ubicació del contenidor Les meves macros és a l'espai d'usuari i depèn del sistema operatiu:
En el Windows,
%APPDATA%\LibreOffice\4\user\Scripts\python.
En el Linux i el macOS:
$HOME/.config/libreoffice/4/user/Scripts/python.
Document macros are embedded in the document and are accessible only when the document is open.
Like BASIC macros, Python macros can be organized in libraries, modules and macros.
Libraries are folders in the container tree. To create a library, add a folder in the target container. The library name is the folder name.
A module is a python file in the library or the container. Create a module adding a file in the container.
Una macro és un objecte del Python al mòdul.