john_whorfin wrote:
I'm trying to figure out: where do the python errors go when there is a syntax error in the script?
Greets John,
I'm not a GIMP python person and I don't know the direct answer to your question in Windows but interpreted languages, like python and scheme, normally direct output to the console (or to GUI message dialog). This is the case in Linux. If python-fu isn't displaying those messages in a GUI dialog or in the python-fu console, you might try redirecting GIMP messages to the Windows console.
You can check "gimp --help" on your system to see which options are compiled in.
Here is my gimp --help
]$ gimp -help
Usage:
gimp [OPTION...] [FILE|URI...]
GNU Image Manipulation Program
Help Options:
-h, --help Show help options
--help-all Show all help options
--help-gegl Show GEGL Options
--help-gtk Show GTK+ Options
Application Options:
-v, --version Show version information and exit
--license Show license information and exit
--verbose Be more verbose
-n, --new-instance Start a new GIMP instance
-a, --as-new Open images as new
-i, --no-interface Run without a user interface
-d, --no-data Do not load brushes, gradients, patterns, ...
-f, --no-fonts Do not load any fonts
-s, --no-splash Do not show a startup window
--no-shm Do not use shared memory between GIMP and plugins
--no-cpu-accel Do not use special CPU acceleration functions
--session=<name> Use an alternate sessionrc file
-g, --gimprc=<filename> Use an alternate user gimprc file
--system-gimprc=<filename> Use an alternate system gimprc file
-b, --batch=<command> Batch command to run (can be used multiple times)
--batch-interpreter=<proc> The procedure to process batch commands with
-c, --console-messages Send messages to console instead of using a dialog
--pdb-compat-mode=<mode> PDB compatibility mode (off|on|warn)
--stack-trace-mode=<mode> Debug in case of a crash (never|query|always)
--debug-handlers Enable non-fatal debugging signal handlers
--g-fatal-warnings Make all warnings fatal
--dump-gimprc Output a gimprc file with default settings
--display=DISPLAY X display to use
Another thought would be to try running GIMP with the --verbose option.
You could also try running the plug-in directly from the command line but I don't know the exact syntax for that in Windows, uses something like "gimp-console", I believe. Look for the those executables and check their options.
There are a couple of python "code checkers" out there like PyChecker or PyLint, which might be useful in debugging syntax errors.
Push comes to shove, start your plug-in as skeleton code and add small sections in at a time, testing as you go.
Sorry I couldn't assist more but maybe some of those suggestions will help.