Is there a way to detect when a macro is done executing.
I am working on oooscript.
It packs python libraries into a single file and compiles the result into a LibreOffice Document.
This is done to allow a multi file (python package) to be executed as a macro.
This is done in part by a special entry point file that loads the python lib location into the python sys.path
.
It is not critical but I would like to remove the entry from the sys.path
after the macro is done executing and add it again when the macro executes. Adding is easy. I don’t know how to detect when macro is done executing.
I know it is possible to implement some sort of callback or event when that can be triggered in each macro function but this is not a good choice. oooscript
is meant to allow developers to have flexibility and require implementing callback is not a good option.