Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Plugin from .bat
#1
Hello Folks,

I am trying to call a Python Script from a Windows batch file, but somehow I can't get it to work. All I ever got was "batch execution failed". I am certain that the problem lies within the .bat file that I use to call the script. Can someone please tell me the right syntax?

Code:
REM switch to GIMP folder
cd C:\Users\wa2378\AppData\Local\Programs\GIMP 2\bin
REM start Gimp
Start gimp-console-2.10.exe -idf --batch-interpreter=python-fu-eval -b "import sys; sys.path=[\".\"]+sys.path;import save2png;save2png.convert(\"sample.xcf\")"

I am pretty sure the problem is with the escaped quotes but I don't know how to change that and I couldn't find a working example anywhere. The example is taken from here and untouched except the modified quotes:

http://gimpchat.com/viewtopic.php?f=9&t=15024

Thanks in advance!
Reply


Messages In This Thread
Python Plugin from .bat - by Eonwe - 02-01-2022, 01:51 PM
RE: Python Plugin from .bat - by Kevin - 02-01-2022, 03:56 PM
RE: Python Plugin from .bat - by Ofnuts - 02-01-2022, 04:04 PM
RE: Python Plugin from .bat - by Eonwe - 02-01-2022, 05:11 PM
RE: Python Plugin from .bat - by Eonwe - 02-03-2022, 02:58 PM

Forum Jump: