On Sun, Apr 18, 2010 at 11:12:05AM +0200, Jason S. wrote:
> 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:
> [...] example code
> But I keep getting an 'execution error' linked to the fout statement.
Could you paste the error as well?

> 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 problem.
IMHO it's better do use absolute imports like:

    import ofstream

But that will not fix your problem.

> 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?
It would be much more helpful if you could paste the whole traceback...

If you can import your module, it should also be possible to access your
function. What will happen if you you explicitly import your function:

    from ofstrem import fout

Roman Joost
www: http://www.romanofski.de
email: romanof...@gimp.org

Attachment: signature.asc
Description: Digital signature

Gimp-developer mailing list

Reply via email to