ravindra.rajaram
April 27th, 2008, 10:06 AM
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
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