Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
gimp.image_list() vs pdb.gimp_image_list()
➤> pdb.gimp_image_list()
(1, (1,))

➤> gimp.image_list()
[<gimp.Image '[KentsHouse-FamInDen] (imported)'>]

Obviously two different commands (procedures? attributes? properties?), despite their similar names.

The Python Console "Browse" button shows info about pdb.gimp_image_list(), but seems to know nothing about the other. Where is this other command coming from (if not GIMP's internal Procedure DataBase), and how would I know about it if I hadn't just stumbled onto it?

There is an additional "object" layer in the Python interface. Many things in the PDB also exist as object methods and make the code a lot easier to write (and read...). A general documentation can be found here, but not everything is 100% documented. A good way to find things is to use dir(object) on various objects. You will see fairly obvious equivalents of the PDB functions:
  • read-only attributes that are the equivalents of get*() functions
  • read/write attributes that are the equivalents of get*() and set*() functions
  • plain methods

Forum Jump: