Broken example code in GIMP Python Console docs

I tried the Python Console commands shown in the ancient 2.6 screenshot on 10.6. The “Python-Fu” Submenu in GIMP git master.

For the shown command
>>> print("Version: %s" % str(Gimp.version))
I get the output
Version: gi.FunctionInfo(version, bound=None)
and not the GIMP version number as shown in the screenshot.

After the commands
>>> import pdb
>>> image = pdb.gimp_image_new(width, height, type)
I get a Traceback saying
AttributeError: module 'pdb' has no attribute 'gimp_image_new'

What are the correct commands to use nowadays, in order to fix the outdated documentation? Thanks in advance.

It should be Gimp.version() and Gimp.Image.new(width, height, type)

1 Like

Thanks for the quick answer! I’ve put up a patch in Update Python Console screenshots and procedure names (!299) · Merge requests · GNOME / gimp-help · GitLab if someone feels like reviewing if it’s correct.