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

gimpfu calling xsane

This discussion is connected to the gimp-user-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.

8 of 8 messages available
Toggle history

Please log in to manage your subscriptions.

gimpfu calling xsane Andreas Matthias 09 Nov 12:52
  gimpfu calling xsane Chris Mohler 09 Nov 19:03
gimpfu calling xsane Andreas Matthias 09 Nov 19:17
  gimpfu calling xsane Chris Mohler 09 Nov 19:47
   gimpfu calling xsane Sven Neumann 10 Nov 09:31
gimpfu calling xsane Andreas Matthias 09 Nov 20:01
  gimpfu calling xsane David Gowers 09 Nov 23:51
gimpfu calling xsane Andreas Matthias 10 Nov 18:52
Andreas Matthias
2008-11-09 12:52:02 UTC (about 16 years ago)

gimpfu calling xsane

I'm trying to write a python script that opens the xsane dialog. But the example script below does not work. Any idea what's wrong?

Ciao Andreas

#! /usr/bin/env python from gimpfu import *

def foobar(*args): print "start foobar()"
pdb.xsane()
print "end foobar()"

register( "run_xsane", "", "", "", "", "", "/Xtns/Foobar", "",
[], [],
foobar
)

main()

Chris Mohler
2008-11-09 19:03:51 UTC (about 16 years ago)

gimpfu calling xsane

On Mon, Nov 10, 2008 at 5:52 AM, Andreas Matthias wrote:

I'm trying to write a python script that opens the xsane dialog. But the example script below does not work. Any idea what's wrong?

Hi Andreas,

I don't find xsane in the pdb. Have you looked in Help->Procedure Browser?

Chris

Andreas Matthias
2008-11-09 19:17:08 UTC (about 16 years ago)

gimpfu calling xsane

Chris Mohler wrote:

On Mon, Nov 10, 2008 at 5:52 AM, Andreas Matthias wrote:

I'm trying to write a python script that opens the xsane dialog. But the example script below does not work. Any idea what's wrong?

I don't find xsane in the pdb. Have you looked in Help->Procedure Browser?

Yes, I have. It's there. And it's coming from /usr/lib/gimp/2.0/plug-ins/xsane which is a link to /usr/bin/xsane.

Running my script doesn't produce any error (warning) messages. It just stops after displaying "start foobar()".

Ciao Andreas

Chris Mohler
2008-11-09 19:47:13 UTC (about 16 years ago)

gimpfu calling xsane

On Mon, Nov 10, 2008 at 12:17 PM, Andreas Matthias wrote:

Chris Mohler wrote:

On Mon, Nov 10, 2008 at 5:52 AM, Andreas Matthias wrote:

I'm trying to write a python script that opens the xsane dialog. But the example script below does not work. Any idea what's wrong?

I don't find xsane in the pdb. Have you looked in Help->Procedure Browser?

Yes, I have. It's there. And it's coming from /usr/lib/gimp/2.0/plug-ins/xsane which is a link to /usr/bin/xsane.

Running my script doesn't produce any error (warning) messages. It just stops after displaying "start foobar()".

If I try calling "pdb.xsane()" or "pdb.xsane(0)" fron the python-fu console, I get: "extension 'xsane' aborted before sending its extension_ack message"

Not even sure if that's helpful. I've never tried calling an external program through the pdb before...

Chris

Andreas Matthias
2008-11-09 20:01:32 UTC (about 16 years ago)

gimpfu calling xsane

Chris Mohler wrote:

On Mon, Nov 10, 2008 at 12:17 PM, Andreas Matthias wrote:

Chris Mohler wrote:

On Mon, Nov 10, 2008 at 5:52 AM, Andreas Matthias wrote:

I'm trying to write a python script that opens the xsane dialog. But the example script below does not work. Any idea what's wrong?

I don't find xsane in the pdb. Have you looked in Help->Procedure Browser?

Yes, I have. It's there. And it's coming from /usr/lib/gimp/2.0/plug-ins/xsane which is a link to /usr/bin/xsane.

Running my script doesn't produce any error (warning) messages. It just stops after displaying "start foobar()".

If I try calling "pdb.xsane()" or "pdb.xsane(0)" fron the python-fu console, I get: "extension 'xsane' aborted before sending its extension_ack message"

Here (gimp-2.4.2, xsane-0.996) the console just stalls. No error message, no prompt, not responding to button clicks.

Maybe xsane is not meant to be called through the pdb?

Ciao Andreas

David Gowers
2008-11-09 23:51:35 UTC (about 16 years ago)

gimpfu calling xsane

What happens if you type

xsane (run_mode = 0)

???

(you can use this trick to trigger interactive calling for all PDB functions that support it)

David

Sven Neumann
2008-11-10 09:31:37 UTC (about 16 years ago)

gimpfu calling xsane

Hi,

On Mon, 2008-11-10 at 12:47 +0000, Chris Mohler wrote:

If I try calling "pdb.xsane()" or "pdb.xsane(0)" fron the python-fu console, I get: "extension 'xsane' aborted before sending its extension_ack message"

Not even sure if that's helpful. I've never tried calling an external program through the pdb before...

Yes you did. All plug-ins are external programs.

Looks like the xsane plug-in installs itself as an extension instead of as a plug-in. That might be what the plug-in author intended to do, but more likely it is just plain wrong. This is explained in http://developer.gimp.org/api/2.0/libgimp/libgimp-gimp.html#gimp-install-procedure

I guess that the xsane plug-in needs to be fixed.

Sven

Andreas Matthias
2008-11-10 18:52:40 UTC (about 16 years ago)

gimpfu calling xsane

David Gowers wrote:

What happens if you type

xsane (run_mode = 0)

Oh yes, that works. At least it shows the xsane dialog but it does not return anything apart from an execution error.

I originally intended to control xsane with a script, but it seems that the xsane plug-in is not ready for that.

Ciao Andreas