Gimp-Forum.net
Good documentation for python-fu - 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)
+---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions)
+---- Thread: Good documentation for python-fu (/Thread-Good-documentation-for-python-fu)



Good documentation for python-fu - Spurt - 08-25-2019

Hi. Have search the web from my corner with no luck in finding a full or close to full fledged documentation for Python-fu. So far have found: https://www.gimp.org/docs/python/index.html#procedural_database and http://www.ve3syb.ca/wiki/doku.php/software:sf:reg-block-args#sf-dirname . The last one is for Script-fu but is very close to Python-fu.

If somone know of a good documentation and feel incline to share i (and probably many other) would be very appreciative.



RE: Good documentation for python-fu - Ofnuts - 08-25-2019

Beyond your first link:
  • Filters>Python-Fu>Console>Browse, and use the search bar
  • In the Python console use dir(someObject) to check the available methods. They are usually a self-explanatory parallel of a similar PDB function. Using these methods makes the code more readable IMHO. Many are documented in your first link, but some are not (and work just as well).
Otherwise, as a general rule, where Script-fu takes IDs, Python-fu takes objects, and the non-existing id (-1) can be replaced by None.

Over the years I have tried many things, so my two script collections can be used as examples:
Otherwise you can always ask here Smile


RE: Good documentation for python-fu - Spurt - 08-26-2019

Wow, i knew extraordinary people existed  Wink Cool 
Thanks for the sharing.