Python Scripts Organization and Location

LibreOffice macros are grouped in module files, modules are usually grouped in library folders, and libraries are grouped in library containers although containers can contain modules too.

A könyvtárat a makrók egy teljes kategóriájának vagy egy teljes alkalmazásnak a fő csoportosításaként használják. A modulok általában megosztják a funkciókat, például a felhasználói interakciót és a számításokat. Az egyes makrók eljárások és függvények. Az alábbi ábra a LibreOffice makrokönyvtárak hierarchikus felépítésére mutat példát.

Library Container diagram

Figure: Macro Library hierarchy

The containers are accessible in all LibreOffice programs through the user interface. Go to Tools > Macros > Organize Macros > Python, to open the Python Macros dialog.

Three library containers are shown in the Macro From list:

  1. My Macros: personal macros available for the LibreOffice user

  2. Application Macros: system macros distributed with LibreOffice for every computer user

  3. Document macros: every document can contain macro libraries available in that document for all users

Python parancsfájl helyek

Refer to Getting Session Information in order to get programmatic access to Python script locations.

Alkalmazásmakrók

Existing macros in this location (container) were copied by the installation program and are available to every computer user, and any open document can access macros stored the container. You need administrative rights to store or edit macros here.

The LibreOffice Macros container location in the file system depends on the operating system:

Saját makrók

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.

The My Macros container location is in the user space and depends on the operating system:

Dokumentummakrók

Document macros are embedded in the document and are accessible only when the document is open.

Libraries, Modules and Macros

Python macros can be organized in libraries, modules and macros. Use the Macro Library hierarchy as a guide when creating or installing new macros in module files, new module files in library folders or new library folders in containers.

Támogasson minket!