Bug 85484 - Make Python macro examples editable
Summary: Make Python macro examples editable
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-Python
  Show dependency treegraph
 
Reported: 2014-10-26 14:25 UTC by Philipp Weissenbacher
Modified: 2020-04-24 16:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Weissenbacher 2014-10-26 14:25:30 UTC
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
Comment 1 Robinson Tryon (qubit) 2015-02-04 08:47:33 UTC
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
Comment 2 Kevin Suo 2016-01-18 15:07:38 UTC
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.
Comment 3 Philipp Weissenbacher 2016-02-07 16:51:12 UTC
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.).
Comment 4 Buovjaga 2020-04-24 16:15:18 UTC
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