RSS/Atom feed Twitter
Site is read-only, email is disabled

starting out developing with python-fu

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

starting out developing with python-fu sergio 06 Jul 06:47
  starting out developing with python-fu Sven Neumann 06 Jul 21:57
sergio
2009-07-06 06:47:22 UTC (over 15 years ago)

starting out developing with python-fu

i am currently working on figuring out how python fu works by following some of the tutorials i see online..

in trying to get a simple one running, and am having problems...

running listing [1], i get:

Traceback (most recent call last): File "/opt/local/lib/gimp/2.0/python/gimpfu.py", line 801, in _run res = apply(func, params[1:])
TypeError: python_pytest() takes exactly 2 arguments (0 given)

in the terminal window..

any ideas?

thanks!

listing [1]

#!/usr/bin/env python

from gimpfu import *

def python_pytest(img, layer) : pdb.gimp_image_flip(img, ORIENTATION_VERTICAL)

register( "python_fu_pytest",
"Does something",
"Does something terribly useful",
"Your name",
"Your name",
"2009",
"Py Test...",
"*",
[
],
[],
python_pytest,
menu="/Filters/Distorts")

main()

___ peace,
sergio
photographer, journalist, visionary
www.village-buzz.com

Sven Neumann
2009-07-06 21:57:34 UTC (over 15 years ago)

starting out developing with python-fu

Hi,

On Mon, 2009-07-06 at 00:47 -0400, sergio wrote:

i am currently working on figuring out how python fu works by following some of the tutorials i see online..

in trying to get a simple one running, and am having problems...

running listing [1], i get:

Traceback (most recent call last): File "/opt/local/lib/gimp/2.0/python/gimpfu.py", line 801, in _run res = apply(func, params[1:])
TypeError: python_pytest() takes exactly 2 arguments (0 given)

in the terminal window..

any ideas?

thanks!

listing [1]

#!/usr/bin/env python

from gimpfu import *

def python_pytest(img, layer) : pdb.gimp_image_flip(img, ORIENTATION_VERTICAL)

register( "python_fu_pytest",
"Does something",
"Does something terribly useful",
"Your name",
"Your name",
"2009",
"Py Test...",
"*",
[
],
[],
python_pytest,
menu="/Filters/Distorts")

main()

You register your script with zero parameters, but your python_pytest() function takes two parameters. Just have a look at the scripts that ship with GIMP.

Sven