(07-04-2023, 03:55 PM)pwiecek56 Wrote: I'm trying to learn python scripting. I'm working in the Python-fu console
How do I terminate a loop?
example:
#############################
list = gimp.image_list()
for x in list:
pdb.gimp_image_delete(x)for imag
list
#############################
No matter what I try, the console tries to include the next line in the loop
You just strike [enter] until you are back to the ➤➤➤ prompt:
But you can't delete an image that hasn't been created by the script,
This is because such image has a view and you cannot delete an image that has views. And you can't normally obtain a reference to an existing image view to close it (but if you create the view with a script then you have a reference to the view, so you can close it in the script).
There is an Images dockable dialog from which you can manually delete images that have no attached "view".