The Python macro examples in Tools -> Macros -> Organize Macros ... -> Python are not editable from within LibreOffice. The reason is twofold: 1) the 'Edit' button is grayed out an 2) the file location is usually not user-editable. This could be fixed by: 1) launching the systems editor for Python files and 2) moving the example files from /opt/libreoffice4.3/share/Scripts/python to ~/.config/libreoffice/4/user/Scripts/python
TESTING with LO 4.4.0.3 + Ubuntu 14.04 (In reply to Philipp Weissenbacher from comment #0) > The Python macro examples in Tools -> Macros -> Organize Macros ... -> Python > are not editable from within LibreOffice. > CONFIRMED > The reason is twofold: > 1) the 'Edit' button is grayed out an > 2) the file location is usually not user-editable. > > This could be fixed by: > 1) launching the systems editor for Python files and There is a built-in editor inside LibreOffice, so that could be used... > 2) moving the example files from /opt/libreoffice4.3/share/Scripts/python to > ~/.config/libreoffice/4/user/Scripts/python Sounds like a plausible idea for an enhancement. Status -> NEW
I strongly suggest to make a copy of the example python macro to your user profile for editing. The examples are just examples, if you need editing, make a copy then.
I agree with "make your own copy for editing". However, there really should be a built-in editor for Python. It would be great to merge Calcs UI with the power of the strong processing and computing eco-system of Python (NumPy, SciPy, SciKit-learn etc.).
I discussed this topic with a member of the macro team and he suggested to close this. (In reply to Philipp Weissenbacher from comment #3) > I agree with "make your own copy for editing". However, there really should > be a built-in editor for Python. > > It would be great to merge Calcs UI with the power of the strong processing > and computing eco-system of Python (NumPy, SciPy, SciKit-learn etc.). It seems it would not be a good idea to invest in a built-in Python editor while there exists a strong ecosystem of dedicated editors. The existing IDEs can be used with LibreOffice to some extent: https://wiki.documentfoundation.org/Macros/Python_Design_Guide#From_an_IDE_via_LibreOffice_Python_interpreter