Gimp-Forum.net
Plug-in help - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: Plug-in help (/Thread-Plug-in-help)

Pages: 1 2


RE: Plug-in help - Ofnuts - 01-09-2025

(01-08-2025, 04:48 PM)Deedolith Wrote: Thanks for the help,
Indeed it was an argument error.

Guess the tutorial I followed is outdated: https://testing.docs.gimp.org/2.10/en/gimp-using-python-plug-in-tutorial.html#gimp-tutorial-python-plug-in-basics
Any up to date links suggested ?

(01-08-2025, 08:45 AM)gasMask Wrote: I don't know your coding experience, but VS Code will help you catch frustrating errors and teach useful code habbits.
I have very good experience with languages such as C++ or VB.Net, but I am fairly "green" with python.
Also, I am using Visual Studio, alas it does not support Gimp nativelly (unsure if I can configure it to do so).

No better suggestion but you can report that the tutorial is wrong.

Personally I'm using PyCharm (I used a plain editor for Gimp 2.10 scripts). I eventually managed to make it understand the Gimp GI imports, so I have some modicum of code completion. And I tend to pepper my code with type hints so PyCharm catches many things before I even try to run the code (with Python 2.7 the first runs were mostly used to fix syntax errors...).


RE: Plug-in help - gasMask - 01-09-2025

(01-08-2025, 03:43 PM)MrsP-from-C Wrote: as a side question:

Quote:but VS Code will help you catch frustrating errors and teach useful code habbits

What addons / plugins do you prefer there for python coding?

[attachment=12892]

(01-09-2025, 02:03 AM)Ofnuts Wrote:
(01-08-2025, 04:48 PM)Deedolith Wrote: Thanks for the help,
Indeed it was an argument error.

Guess the tutorial I followed is outdated: https://testing.docs.gimp.org/2.10/en/gimp-using-python-plug-in-tutorial.html#gimp-tutorial-python-plug-in-basics
Any up to date links suggested ?

(01-08-2025, 08:45 AM)gasMask Wrote: I don't know your coding experience, but VS Code will help you catch frustrating errors and teach useful code habbits.
I have very good experience with languages such as C++ or VB.Net, but I am fairly "green" with python.
Also, I am using Visual Studio, alas it does not support Gimp nativelly (unsure if I can configure it to do so).

No better suggestion but you can report that the tutorial is wrong.

Personally I'm using PyCharm (I used a plain editor for Gimp 2.10 scripts). I eventually managed to make it understand the Gimp GI imports, so I have some modicum of code completion. And I tend to pepper my code with type hints so PyCharm catches many things before I even try to run the code (with Python 2.7 the first runs were mostly used to fix syntax errors...).

I use PyCharm too, mostly to review code that I've already prepared in VS Code. In my experience, PyCharm catches more errors than VS Code. I prefer VS Code mostly because of its ease of use and its font. I'm visually impaired by artifacts created by Lasik eye surgery, so I find VS Code's font paired with a high contrast dark theme to be more readable than anything I can do natively in PyCharm.


RE: Plug-in help - MrsP-from-C - 01-09-2025

Thanks a lot @gasmask