Posts: 74
Threads: 20
Joined: Feb 2024
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
02-28-2024, 05:29 PM
(This post was last modified: 02-28-2024, 05:36 PM by gimpygirl.)
Hi
What exactly can the python console do in gimp and for what do you use it?
Is there any docs?
A small example of its usage would be great!
Posts: 319
Threads: 36
Joined: Mar 2018
Reputation:
25
Operating system(s):
I understand it's used for pasting-in python code and error checking it. If there is no error then the code should run OK
Posts: 74
Threads: 20
Joined: Feb 2024
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
(02-28-2024, 08:37 PM)Tas_mania Wrote: I understand it's used for pasting-in python code and error checking it. If there is no error then the code should run OK
Also a whole plugin written in python because that's what you use python for in GIMP?
It's not clear for me what exactly you can use it for.
Posts: 6,350
Threads: 274
Joined: Oct 2016
Reputation:
565
Operating system(s):
Gimp version: 2.10
02-28-2024, 11:39 PM
(This post was last modified: 02-28-2024, 11:40 PM by Ofnuts.)
(02-28-2024, 05:29 PM)gimpygirl Wrote: Hi
What exactly can the python console do in gimp and for what do you use it?
Is there any docs?
A small example of its usage would be great!
Your big friend is the "Browse..." button. let's you search the API (PDB). Methods/attributes shown above are mostly shorthand to PDB entries so if you can't guess how they work, search for something like-named in the PDB. In the Browser, when you hit Apply, a sample call is pushed in the console input, so the code is almost written for you.
Posts: 74
Threads: 20
Joined: Feb 2024
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
02-28-2024, 11:59 PM
(This post was last modified: 02-29-2024, 12:10 AM by gimpygirl.)
Hi
I think you're an expert.
Are you not interested maybe in writing a small PDF file that has all these tips and tutorials bundled?
So about the python console, debugging, ...
There is just no information to be found online and as a beginner you don't know what to do.
Even the example above is of great value. I know immediately how it works.
So that's why I ask.
It could become the best resource for plugin developers!
What do you think?
Another question: do I need to restart GIMP for each code change in a plugin?
There is for script-fu a refresh menu-item but not for python-fu
All these tips should be bundled somewhere. It would also save you A LOT of time answering the same questions over and over again :-)
I hope you like the idea of making a PDF file. You can just copy paste the tutorials you already wrote on the forum.
Posts: 6,350
Threads: 274
Joined: Oct 2016
Reputation:
565
Operating system(s):
Gimp version: 2.10
Experience shows that people hardly read the docs or can't find them on Google, or can't find how the doc apply to their problem. And seasoned coders don't need the same doc as beginners....
(02-28-2024, 11:59 PM)gimpygirl Wrote: Another question: do I need to restart GIMP for each code change in a plugin?
There is for script-fu a refresh menu-item but not for python-fu
No need to restart Gimp, unless the change impacts the registration (adding/changing parameters to the script). When Gimp (re-)starts it checks if the files have changed since the previous registrations and runs them to re-register if so. Usually, I write a script that just register an empty function, and then I add code to the function little by little.
Script-fus are different animals, the script-fu executor has to be told to check for new code versions (hence the refresh) but it can update the registration data without restarting Gimp.
Posts: 25
Threads: 4
Joined: Feb 2024
Reputation:
0
Operating system(s):
Gimp version: 2.10
I'll be honest here, I've looked at both python-fu and script-fu consoles, and hit the browse buttons. And having done so, I'm clueless as to what all those entries are for. Mind you, I haven't researched what either are for or how to use them as I'm still trying to figure out how to get Resynthesizer to work in a GIMP Appimage that is purported to support it, but doesn't.
No idea what a Goat-exercise is either.
Looking at post #4 didn't help, I don't know what any of that means either.
Posts: 74
Threads: 20
Joined: Feb 2024
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
Gimp version: 2.10
02-29-2024, 02:10 AM
(This post was last modified: 02-29-2024, 02:10 AM by gimpygirl.)
Posts: 1,146
Threads: 178
Joined: Sep 2018
Reputation:
114
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
A way from user to coder
Posts: 6,350
Threads: 274
Joined: Oct 2016
Reputation:
565
Operating system(s):
Gimp version: 2.10
|