03-24-2020, 10:22 PM
Hi all,
I've been trying hard to get a batch script converted over from script-fu in Python but I'm struggling to get it to close the process as I can't seem to get it to close GIMP. The script runs but it won't kill the process so is making everything hang.
I can't seem to find any docs on how to actually do some of this stuff, it seems that those that know, know and I'm not sure how to fill in the gaps in my knowledge.
Up front I'm new to python but a long in the tooth coder in various other languages.
So my question is, what is the correct way to close GIMP these days?
I'm running GIMP 2.10.18 on Windows 10
This is roughly my command I'm running:
"C:\Program Files\GIMP 2\bin\gimp-console-2.10.exe" -id --batch-interpreter python-fu-eval -b "import sys;sys.path=['.']+sys.path;import mydynamicTextReplace;dynamicTextReplace.process('my_example_param_1')"
So far I've tried (yep I'm in cut and paste "lets see if this works" land at this point):
Many thanks in advance.
I've been trying hard to get a batch script converted over from script-fu in Python but I'm struggling to get it to close the process as I can't seem to get it to close GIMP. The script runs but it won't kill the process so is making everything hang.
I can't seem to find any docs on how to actually do some of this stuff, it seems that those that know, know and I'm not sure how to fill in the gaps in my knowledge.
Up front I'm new to python but a long in the tooth coder in various other languages.
So my question is, what is the correct way to close GIMP these days?
I'm running GIMP 2.10.18 on Windows 10
This is roughly my command I'm running:
"C:\Program Files\GIMP 2\bin\gimp-console-2.10.exe" -id --batch-interpreter python-fu-eval -b "import sys;sys.path=['.']+sys.path;import mydynamicTextReplace;dynamicTextReplace.process('my_example_param_1')"
So far I've tried (yep I'm in cut and paste "lets see if this works" land at this point):
- Adding '-b (gimp-quit 0)' to the end of the command, this was a left over from the script-fu script and I think this fails as I've told it to use the python parser not script-fu?
- Adding '-b "pdb.gimp_quit(1)" ' to the end of the command, no luck with this one
- Adding '-b "gimp.quit(1)" ' to the end of the command, no luck with this one either
- 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
Many thanks in advance.