Amourspirit / python_libre_pythonista_ext

Apache License 2.0
98 stars 5 forks source link

Where are the python scripts stored? #6

Closed parrotcar00 closed 1 month ago

parrotcar00 commented 2 months ago

I'm trying to figure out where are my python scripts stored? That way, I can edit them outside the spreadsheet possibly?

ilmari-lauhakangas commented 1 month ago

See this: https://wiki.documentfoundation.org/Macros/Python_Guide/Introduction#Where_to_save_macros?

Amourspirit commented 1 month ago

The python scrips for a sheet are embeded into the document. They are not publicly available.

Currently the only way to access the scripts WITHOUT using the LibrePythonista editor is to Unzip the document and access the librepythonista folder and its subfolders. Then after edits the document would have to be zipped up again. This is discouraged as the internals of how LibrePythonisa works does not support this kind of editing.

It is posible to see all the code for the currend document however. Open the logging window and then in Calc choose from menu LibrePy -> Debug - Log Module. This will send all the current LibrePythonista python code to the log window.