The first python file is embedded in the LibreOffice file, the second is in the shared Python Scripts directory. I have 1 file called “ HelloWorld.ods” and 2 Python files 1 called “ HelloWorld.py” and 1 called “ Testing.py”. To illustrate these 2 cases let’s have a look at an example: I am in favor of keeping my programs in a tidy manner to be able to re-use them across many different files but the choice is entirely up to you. The trade-off is that if you want to send your file and the Python macro to go with it you need to send both of them, not just the file. Whereas if you choose to not embed the Python program but to put it in an organised directory(still using APSO), you can re-use it for any other LibreOffice file and you also can edit the program without opening the LibreOffice file if you open it from the relevant folder. So you’ll need to open the LibreOffice file and open the Python Macro organiser in order to edit the Python program. One downside if you do that is that the Python macro (also named Python Script) itself is not accessible outside of the LibreOffice file. This can be useful when you want to send your file with the Python Macro. With the APSO add-on ( see previous article) you can embed your macro with the LibreOffice File.
0 Comments
Leave a Reply. |