You are here

Minimal Python plugin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!

This is a minimal python plugin for GIMP. In contrary to gimpfu-based ones, these do have the functions also available in C plugins (query, init, run, quit) and can (actually, have to) use GTK+ directly to create a user interface.

I've attached an plugin, which does only define what is needed for a plugin (query, and the functions to be used). 99% of all python plug-ins will most likely follow this structure.

The more complete defines all things that you might want to redefine in your plugin.

  • init() is run whenever GIMP starts, so if you got something that should be done at this time (e.g. checking if some peripheral is available), do it then
  • quit() is called wheever one of the other functions is finished. so it is not the place to put stuff that should only be executed when GIMP quits, but maybe you can think of some other uses



Yes, you could do even more and redefine start(), which would enable you to change what is actually regarded as init, query, quit and run). And you could have your own run() as well. It's just that right now, I can't imagine why anyone would want to do this. But maybe there are some clever ideas?

minimal-real.py814 bytes
minimal-really.py706 bytes
GIMP Version: 


AAAAAAAAAAAAH, the .py.txt is back.

Darn, sorry. I updated to Drupal 5.5 and because the issue is with the core file upload module, I missed it. Should be fixed!
Subscribe to Comments for "Minimal Python plugin"