I'm trying to figure out a simple way to execute a Python-Fu script I wrote up that's working in single-threaded mode from the Python-Fu interpreter plugin of Gimp but will no longer work when refactored into its multiprocessing equivalent due to the Windows non POSIX / OS.Fork limitations that pop up in Pool.map_async()
. As a work around I'm trying to invoke the script directly from the cmd shell but can't figure out the right command to get it done. I have the gimp bin directory on my PATH variable and am trying to get something achieved like the following...
c:\>gimp-console-2.8 --no-interface --batch "(python-fu execfile('myPyFuScript.py'))"
c:\>gimp-console-2.8 --no-interface --batch "myPyFuScript.py"
Is there a way to get Gimp to execute a python script using its Python-Fu module from a command issued at the Windows cmd shell?
Just for added background I'm taking inspiration from the following documentation...
GIMP Python Invocation from the Shell
All this means that you could easily invoke a GIMP Python plug-in such as the one above directly from your shell using the (plug-in-script- fu-eval …) evaluator:
gimp --no-interface --batch '(python-fu-console-echo RUN-NONINTERACTIVE "another string" 777 3.1416 (list 1 0 0))' '(gimp-quit 1)'