Results 1 to 5 of 5

Thread: Python and gimpfu

  1. #1
    Join Date
    Jun 2007
    Beans
    28
    Distro
    Ubuntu 9.10 Karmic Koala

    Python and gimpfu

    I'm trying to do something with Python and the gimpfu package.
    Here is the sample code.

    #!/usr/bin/python
    import sys
    try:
    sys.path.append("/usr/lib/gimp/2.0/python/")
    from gimpfu import *
    img = gimp.Image(420,300,RGB)
    gimp.Display(img)
    except ImportError:
    print "Could not import gimpfu package"



    When I execute this with GIMP's "Python-fu"console, things are fine.
    But, when I run the same program in a shell (after saving the code in a file)
    I get the message below:

    LibGimpBase-ERROR **: gimp_wire_write_msg: the wire protocol has not been initialized
    aborting...
    Aborted (core dumped)


    Any explanation for this behavior? It appears that some initializations performed by Script-Fu are missing in the stand-alone execution on the python code.
    How can I make this work when I run this stand-alone?

    Thanks,
    RR

  2. #2
    Join Date
    Jun 2007
    Beans
    28
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Python and gimpfu

    Did I post my query in the wrong area??
    If so, can some one redirect me please??

    Thanks,
    RR

  3. #3
    Join Date
    Dec 2006
    Beans
    256

    Re: Python and gimpfu

    I don't use Python with GIMP but you might find your answers in this gimp.org document.
    "We visited sixty-six islands and landed eighty-one times, wading, swimming (to shore). Most of the people were friendly and delightful; only two arrows shot at us, and only one went near -- So much for savages!" - J.C. Patterson

  4. #4
    Join Date
    Jun 2007
    Beans
    28
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Python and gimpfu

    Been busy for sm time..thx for the response..
    I'll look for more details in the doc.

    Thanks,
    RR

  5. #5
    Join Date
    Aug 2008
    Beans
    0

    Re: Python and gimpfu

    It worked when I run this in python console within GIMP.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •