Hey all. I'm more or less a beginner when it comes to GIMP scripting (though I
do have a few years of exp in general development) and I've run into a bump
with PyGimp that I was hoping someone might be able to give me a hand with.

As general practice, I've written a function that I put inside a file called
"ofstream.py" (placed in the same folder as gimpfu.py), which consists of:

def fout:
    f = open("C:\testFile.dat")
    f.write("Hello World!")

I then have another script (placed in my plugins folder, to be picked up by
Gimp) which contains:

import math
from gimpfu import *
from ofstream import *

def testFile:

#register code follows...

But I keep getting an 'execution error' linked to the fout statement. If I
comment out that line and replace it with something else, it works fine. The
'import ofstream' line gives me no trouble; its the function call thats the

Why am I having this issue? I can use functions located in gimpfu.py just
fine (register, main, etc). Why can't I use my own function?

Thanks in advance everyone.


Jason S. (via www.gimpusers.com)
Gimp-developer mailing list

Reply via email to