08-09-2025, 11:47 AM
Hi,
I use the python-fu-eval batch interpreter on GIMP 3.0.4 AppImage and have noticed some unexpected behaviour. As a trivial example,
User:~$ ~/AppImages/gimp/GIMP-3.0.4-x86_64.AppImage -i --quit --batch-interpreter=python-fu-eval -b 'if True: a="something"; print(a);'
something
batch command executed successfully
But if the "if" statement comes after the declaration of variable "a"
User:~$ ~/AppImages/gimp/GIMP-3.0.4-x86_64.AppImage -i --quit --batch-interpreter=python-fu-eval -b 'a="something";if True: print(a);'
batch command experienced a calling error:
Traceback (most recent call last):
File "/tmp/.mount_GIMP-3bPBAmP/usr/lib/x86_64-linux-gnu/gimp/3.0/plug-ins/python-eval/python-eval.py", line 42, in code_eval
exec(code, globals())
File "<string>", line 1
a="something";if True: print(a);
^^
SyntaxError: invalid syntax
Similar problems arise with a "with" statement.
I don't understand this. Has anyone else noticed this sort of behaviour?
My OS is linux 6.1.0-37-amd64
Thanks.
I use the python-fu-eval batch interpreter on GIMP 3.0.4 AppImage and have noticed some unexpected behaviour. As a trivial example,
User:~$ ~/AppImages/gimp/GIMP-3.0.4-x86_64.AppImage -i --quit --batch-interpreter=python-fu-eval -b 'if True: a="something"; print(a);'
something
batch command executed successfully
But if the "if" statement comes after the declaration of variable "a"
User:~$ ~/AppImages/gimp/GIMP-3.0.4-x86_64.AppImage -i --quit --batch-interpreter=python-fu-eval -b 'a="something";if True: print(a);'
batch command experienced a calling error:
Traceback (most recent call last):
File "/tmp/.mount_GIMP-3bPBAmP/usr/lib/x86_64-linux-gnu/gimp/3.0/plug-ins/python-eval/python-eval.py", line 42, in code_eval
exec(code, globals())
File "<string>", line 1
a="something";if True: print(a);
^^
SyntaxError: invalid syntax
Similar problems arise with a "with" statement.
I don't understand this. Has anyone else noticed this sort of behaviour?
My OS is linux 6.1.0-37-amd64
Thanks.