Sorry, as a total newbie, I am getting my head in a total spin about where my python macros should reside. I am on Ubuntu 23.04 and LO 7.5.4.2.
What I am trying to do is to write a macro that takes row of numbers from the current spreadsheet and put it in the same place in another spreadsheet called Tool.ods (also open).
As far as I can make out, to achieve this in LO my scripts need to sit in .config/libreoffice/4/user/Scripts/Python/.
However, it seems to me that Geany wants to put all my macros into /home/projects
When I click on New Project. I get a box asking me for File, File Name and Base Path
File I presume is XXXX.py....but what do I put in for File Name and Base Path?.....If I try to change any of the two to .config/libreoffice/4/user/Scripts/Python/......I find I cannot. I don't want to use default as then the script will not appear in the LO Macro look up box. What am I missing please?
On Mon, 31 Jul 2023 at 14:52, dunbrokin--- via Users users@lists.geany.org wrote:
Sorry, as a total newbie, I am getting my head in a total spin about where my python macros should reside. I am on Ubuntu 23.04 and LO 7.5.4.2.
Please always give the version of Geany, there is no guarantee that anybody knows which version Ubuntu XXX has.
Please do not use abbreviations, as was noted before, use LibreOffice, not LO, someone who might otherwise be able to help you might not do so because they don't understand LO.
What I am trying to do is to write a macro that takes row of numbers from the current spreadsheet and put it in the same place in another spreadsheet called Tool.ods (also open).
Its pretty unlikely that any Geany people will know about the specifics of LibreOffice Python, we build Geany not LibreOffice, for example is this script meant to be activated by LibreOffice, or run external to it? Details of script operation you need to ask on LibreOffice forums.
As far as I can make out, to achieve this in LO my scripts need to sit in .config/libreoffice/4/user/Scripts/Python/.
However, it seems to me that Geany wants to put all my macros into /home/projects
1. see below 2. Geany saves files where you tell it to, if you create the file in Geany the first time you save the dialog will allow you to navigate to any directory to save, so go to .config/libreoffice/4/user/Scripts/Python/ and save there if thats where LibreOffice wants them. 3. When you open an existing file Geany will save to the same location unless you change it with save as.
When I click on New Project. I get a box asking me for File, File Name and Base Path
File I presume is XXXX.py....but what do I put in for File Name and Base Path?.....If I try to change any of the two to .config/libreoffice/4/user/Scripts/Python/......I find I cannot. I don't want to use default as then the script will not appear in the LO Macro look up box. What am I missing please?
1. from above, you are just editing script files for LibreOffice, you don't really need to use projects, just save your Python files in the required directory, nor for Python do you need to compile or build, those are available for advanced users, but most of the time for Python all you need to do is run your script, (or activate it from LibreOffice if thats how its run).
Cheers Lex _______________________________________________
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Yes, apologies, I am on Geany1.38....Yes, apologies, will use LibreOffice in the future instead of the abbreviation.
2. Geany saves files where you tell it to, if you create the file in Geany the first time you save the dialog will allow you to navigate to any directory to save, so go to .config/libreoffice/4/user/Scripts/Python/ and save there if thats where LibreOffice wants them.
Ah! OK, because I could not get it to find .config/libreoffice...etc...I assumed there was an error...but your comment prompted me to do it manually....and that worked! Thank you!
1. from above, you are just editing script files for LibreOffice, you don't really need to use projects, just save your Python files in the required directory, nor for Python do you need to compile or build, those are available for advanced users, but most of the time for Python all you need to do is run your script, (or activate it from LibreOffice if thats how its run).
Yes, thanks for that. Mostly I will be running them through LibreOffice....but I will occasionally run one through Geany....for example the following one....which I seem to be having a problem with,
[image: image.png]
When I compiled it I got an error I did not understand....and yet it seemed to run with no error....but it never printed a result. I am totally baffled at this.
Where might I have gone wrong....or where am I misunderstanding Geany.
Thank you.
On Mon, Jul 31, 2023 at 6:59 PM Lex Trotman via Users users@lists.geany.org wrote:
On Mon, 31 Jul 2023 at 14:52, dunbrokin--- via Users users@lists.geany.org wrote:
Sorry, as a total newbie, I am getting my head in a total spin about
where my python macros should reside.
I am on Ubuntu 23.04 and LO 7.5.4.2.
Please always give the version of Geany, there is no guarantee that anybody knows which version Ubuntu XXX has.
Please do not use abbreviations, as was noted before, use LibreOffice, not LO, someone who might otherwise be able to help you might not do so because they don't understand LO.
What I am trying to do is to write a macro that takes row of numbers
from the current spreadsheet and put it in the same place in another spreadsheet called Tool.ods (also open).
Its pretty unlikely that any Geany people will know about the specifics of LibreOffice Python, we build Geany not LibreOffice, for example is this script meant to be activated by LibreOffice, or run external to it? Details of script operation you need to ask on LibreOffice forums.
As far as I can make out, to achieve this in LO my scripts need to sit
in .config/libreoffice/4/user/Scripts/Python/.
However, it seems to me that Geany wants to put all my macros into
/home/projects
- see below
- Geany saves files where you tell it to, if you create the file in
Geany the first time you save the dialog will allow you to navigate to any directory to save, so go to .config/libreoffice/4/user/Scripts/Python/ and save there if thats where LibreOffice wants them. 3. When you open an existing file Geany will save to the same location unless you change it with save as.
When I click on New Project. I get a box asking me for File, File Name
and Base Path
File I presume is XXXX.py....but what do I put in for File Name and Base
Path?.....If I try to change any of the two to .config/libreoffice/4/user/Scripts/Python/......I find I cannot. I don't want to use default as then the script will not appear in the LO Macro look up box. What am I missing please?
- from above, you are just editing script files for LibreOffice, you
don't really need to use projects, just save your Python files in the required directory, nor for Python do you need to compile or build, those are available for advanced users, but most of the time for Python all you need to do is run your script, (or activate it from LibreOffice if thats how its run).
Cheers Lex _______________________________________________
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
...
Yes, thanks for that. Mostly I will be running them through
LibreOffice....but I will occasionally run one through Geany....for example the following one....which I seem to be having a problem with,
[image: image.png]
When I compiled it I got an error I did not understand....and yet it seemed to run with no error....but it never printed a result. I am totally baffled at this.
As was explained on a previous reply to you, Ubuntu does not supply a "python" command, it supplies a "python3" command, but they failed to set the default command in the Ubuntu distribution of Geany to "python3", so when Geany tries to run "python" it is not found.
You can change the commands with the "Set Build Commands" dialog.
Note: Geany supports 60+ languages, most of which have different compile/build/execute commands, when setting the commands the current document must be the relevant language, eg one of your python scripts.
Cheers Lex
Where might I have gone wrong....or where am I misunderstanding Geany.
Thank you.
...
Thanks for that....but it was already set at python3
[image: image.png]
On Mon, Jul 31, 2023 at 8:09 PM Lex Trotman via Users users@lists.geany.org wrote:
...
Yes, thanks for that. Mostly I will be running them through
LibreOffice....but I will occasionally run one through Geany....for example the following one....which I seem to be having a problem with,
[image: image.png]
When I compiled it I got an error I did not understand....and yet it seemed to run with no error....but it never printed a result. I am totally baffled at this.
As was explained on a previous reply to you, Ubuntu does not supply a "python" command, it supplies a "python3" command, but they failed to set the default command in the Ubuntu distribution of Geany to "python3", so when Geany tries to run "python" it is not found.
You can change the commands with the "Set Build Commands" dialog.
Note: Geany supports 60+ languages, most of which have different compile/build/execute commands, when setting the commands the current document must be the relevant language, eg one of your python scripts.
Cheers Lex
Where might I have gone wrong....or where am I misunderstanding Geany.
Thank you.
...
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
On Mon, 31 Jul 2023 at 20:11, dunbrokin via Users users@lists.geany.org wrote:
Thanks for that....but it was already set at python3
[image: image.png]
Yes, but all it is executing is "python3", not your script. Originally the execute command was "python "%f"", please read the manual https://www.geany.org/manual/current/index.html#substitutions-in-commands-an... to understand the %f and add it back.
Cheers Lex
...
Thank you for that response...it has certainly helped....but still nothing to show..........I have entered some extra print statements to track progress.....but still no output. I am obviously missing some serious understanding of what is going on here!
[image: image.png]
On Mon, Jul 31, 2023 at 10:34 PM Lex Trotman via Users < users@lists.geany.org> wrote:
On Mon, 31 Jul 2023 at 20:11, dunbrokin via Users users@lists.geany.org wrote:
Thanks for that....but it was already set at python3
[image: image.png]
Yes, but all it is executing is "python3", not your script. Originally the execute command was "python "%f"", please read the manual https://www.geany.org/manual/current/index.html#substitutions-in-commands-an... to understand the %f and add it back.
Cheers Lex
... _______________________________________________ Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
This is now a Python issue. You have defined your Bitcoin method, but you aren't calling it anywhere. ________________________________ From: dunbrokin via Users users@lists.geany.org Sent: 31 July 2023 12:10 To: Geany general discussion list users@lists.geany.org Cc: dunbrokin dunbrokin@gmail.com Subject: [Geany-Users] Re: New Project Confusion
Thank you for that response...it has certainly helped....but still nothing to show..........I have entered some extra print statements to track progress.....but still no output. I am obviously missing some serious understanding of what is going on here!
[image.png]
On Mon, Jul 31, 2023 at 10:34 PM Lex Trotman via Users <users@lists.geany.orgmailto:users@lists.geany.org> wrote:
On Mon, 31 Jul 2023 at 20:11, dunbrokin via Users <users@lists.geany.orgmailto:users@lists.geany.org> wrote: Thanks for that....but it was already set at python3
[image.png]
Yes, but all it is executing is "python3", not your script. Originally the execute command was "python "%f"", please read the manual https://www.geany.org/manual/current/index.html#substitutions-in-commands-an... to understand the %f and add it back.
Cheers Lex
... _______________________________________________ Users mailing list -- users@lists.geany.orgmailto:users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.orgmailto:users-leave@lists.geany.org
I’m no expert in these things, but I notice that you have “python3” in the Execute command box, but “python -m py_compile” in the Compile command box. Should the compile command read “python3 -m py_compile”?
Virgil
From: dunbrokin via Usersmailto:users@lists.geany.org Sent: Monday, July 31, 2023 6:10 AM To: Geany general discussion listmailto:users@lists.geany.org Cc: dunbrokinmailto:dunbrokin@gmail.com Subject: [Geany-Users] Re: New Project Confusion
Thanks for that....but it was already set at python3
[cid:image001.png@01D9C44F.9F027860]
On Mon, Jul 31, 2023 at 8:09 PM Lex Trotman via Users <users@lists.geany.orgmailto:users@lists.geany.org> wrote:
...
Yes, thanks for that. Mostly I will be running them through LibreOffice....but I will occasionally run one through Geany....for example the following one....which I seem to be having a problem with,
[cid:image002.png@01D9C44F.9F027860]
When I compiled it I got an error I did not understand....and yet it seemed to run with no error....but it never printed a result. I am totally baffled at this.
As was explained on a previous reply to you, Ubuntu does not supply a "python" command, it supplies a "python3" command, but they failed to set the default command in the Ubuntu distribution of Geany to "python3", so when Geany tries to run "python" it is not found.
You can change the commands with the "Set Build Commands" dialog.
Note: Geany supports 60+ languages, most of which have different compile/build/execute commands, when setting the commands the current document must be the relevant language, eg one of your python scripts.
Cheers Lex
Where might I have gone wrong....or where am I misunderstanding Geany.
Thank you.
... _______________________________________________ Users mailing list -- users@lists.geany.orgmailto:users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.orgmailto:users-leave@lists.geany.org
Thanks for that, I will give it a try...but I wonder if that will make any difference to the running of the script...as I am thinking that that change will only affect the compiling.
On Wed, Aug 2, 2023 at 12:13 AM Virgil Arrington via Users < users@lists.geany.org> wrote:
I’m no expert in these things, but I notice that you have “python3” in the Execute command box, but “python -m py_compile” in the Compile command box. Should the compile command read “python3 -m py_compile”?
Virgil
*From: *dunbrokin via Users users@lists.geany.org *Sent: *Monday, July 31, 2023 6:10 AM *To: *Geany general discussion list users@lists.geany.org *Cc: *dunbrokin dunbrokin@gmail.com *Subject: *[Geany-Users] Re: New Project Confusion
Thanks for that....but it was already set at python3
On Mon, Jul 31, 2023 at 8:09 PM Lex Trotman via Users < users@lists.geany.org> wrote:
...
Yes, thanks for that. Mostly I will be running them through
LibreOffice....but I will occasionally run one through Geany....for example the following one....which I seem to be having a problem with,
When I compiled it I got an error I did not understand....and yet it seemed to run with no error....but it never printed a result.
I am totally baffled at this.
As was explained on a previous reply to you, Ubuntu does not supply a "python" command, it supplies a "python3" command, but they failed to set the default command in the Ubuntu distribution of Geany to "python3", so when Geany tries to run "python" it is not found.
You can change the commands with the "Set Build Commands" dialog.
Note: Geany supports 60+ languages, most of which have different compile/build/execute commands, when setting the commands the current document must be the relevant language, eg one of your python scripts.
Cheers
Lex
Where might I have gone wrong....or where am I misunderstanding Geany.
Thank you.
...
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org