Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the correct way to close a python batch job?
#4
(03-25-2020, 10:04 AM)sethsdad Wrote:
(03-25-2020, 12:06 AM)Ofnuts Wrote: In my trials I used -b 'pdb.gimp_quit(1)' and it worked (and you seem to be using my technique). if you open the Python-fu console and enter pdb.gimp_quit(1) Gimp indeed exits.

"Adding variations of "gimp.quit" and "pdb.quit" to the end of my script that I'm importing but these all seem to have zero effect": these shoud elicit error messages. So if they have zero effect they aren't even executed. Did you try to prove to yourself that your main code actually finishes?

Well thank you for the method, my script is a bit of a half baked monster of cut and paste examples I've found here and there from too many stackover flow quesitons/forum posts etc. to remember.

Good point on the script not working, that might be it, it has worked before but with all my hacking around that might not be the case and my focus on the lack of closing might be masking the issue. I'll take a look.

On that note any pointers on how to debug this stuff easier? I'm currently doing to "comment out everything and add it back in one line at a time" phase but its slow and missing some feedback. I can't seem to get any messages out of it either so even simple print statement debugging is out of my reach right now Sad

See here: https://www.gimp-forum.net/Thread-Debugg...in-Windows

Personally, I'm on Linux, so I can start Gimp in a terminal and see its output and my Python print statements there while it runs. Going to Linux has definitely made things a lot easier.
Reply


Messages In This Thread
RE: What is the correct way to close a python batch job? - by Ofnuts - 03-25-2020, 11:28 AM

Forum Jump: