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

debugging and print messages in PyGimp for windows

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

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

debugging and print messages in PyGimp for windows Ryan Krauss 01 Sep 18:16
  debugging and print messages in PyGimp for windows Jernej Simon?i? 01 Sep 20:11
   debugging and print messages in PyGimp for windows Ryan Krauss 02 Sep 14:11
Ryan Krauss
2009-09-01 18:16:48 UTC (about 15 years ago)

debugging and print messages in PyGimp for windows

So, I have PyGIMP correctly installed in windows (I think). I am trying to port my plug-ins from Linux. One big annoyance is that print doesn't seem to work and error messages that probably go to standard out go no where. I really need those messages to debug. I tried launching gimp from the command line. Is there some other way? Where to standard out and standard error messages go on windows?
Right now, when one of my plugins hits a python bug, it just stops and tells me nothing. I tried executing the plugin from the console and I just get "execution error" without even a line number to guide me.

Thanks,

Ryan

Jernej Simon?i?
2009-09-01 20:11:17 UTC (about 15 years ago)

debugging and print messages in PyGimp for windows

On Tuesday, September 1, 2009, 18:16:48, Ryan Krauss wrote:

So, I have PyGIMP correctly installed in windows (I think). I am trying to port my plug-ins from Linux. One big annoyance is that print doesn't seem to work and error messages that probably go to standard out go no where. I really need those messages to debug. I tried launching gimp from the command line. Is there some other way? Where to standard out and standard error messages go on windows?

Nowhere, by default. Run gimp-2.6.exe --verbose to get a console, which should also receive output from plugins.

Ryan Krauss
2009-09-02 14:11:14 UTC (about 15 years ago)

debugging and print messages in PyGimp for windows

So, the --verbose option definitely pops up a dos-looking window and prints lots of GIMP related messages, but it doesn't seem to get error messages from Python. I just accidentally tested this with a syntax error in a module of mine that my PyGIMP plugins import. In linux I get this very helpful message:

ryan@am2|07:02 AM|09_02_09$ gimp Traceback (most recent call last):
File "/home/ryan/.gimp-2.6/plug-ins/pygimp_lecture_utils.py", line 1, in

import os, rwkos, rwkmisc, re, time File "/home/ryan/git/krauss_misc/rwkos.py", line 9 if not amiLinux()
^
SyntaxError: invalid syntax

(gimp:17913): LibGimpBase-WARNING **: gimp: gimp_wire_read(): error

and I can fix that in 30 seconds or so (it is a stupid syntax error on my part, missing the trailing colon).

But in windows, I see no message related to it at all. The only indicator of a problem is that none of my PyGIMP plugins show up in the menus at all (none of them can register themselves because they all import this module). No idea how long it would take me to find the exact line that caused the problem if I didn't try it in Linux.

Is there an easy solution to this? How do I get standard error messages from Python to display in Windows XP?

Thanks,

Ryan

2009/9/1 Jernej Simon?i?

On Tuesday, September 1, 2009, 18:16:48, Ryan Krauss wrote:

So, I have PyGIMP correctly installed in windows (I think). I am trying

to

port my plug-ins from Linux. One big annoyance is that print doesn't

seem

to work and error messages that probably go to standard out go no where.

I

really need those messages to debug. I tried launching gimp from the command line. Is there some other way? Where to standard out and

standard

error messages go on windows?

Nowhere, by default. Run gimp-2.6.exe --verbose to get a console, which should also receive output from plugins.

-- < Jernej Simon?i? ><><><><>< http://eternallybored.org/ >

In the fight between you and the world, back the world. -- Kafka's Law