May-01-2017, 03:49 PM
I'm trying to close each image opened via iteration, within each iteration.
I also tried,
, but no result.
My loop above is opening 5 Windows Photos Viewer dialogs; I was hoping that as I loop through each iteration, each window would be closed.
Thank you.
for i in Final_Bioteck[:5]: with Image.open('{}_screenshot.png'.format(i)) as test_image: test_image.show() time.sleep(2)My code doesn't seem to close the photos opened via Windows Photo Viewer.
I also tried,
test_image.close()
, but no result.
My loop above is opening 5 Windows Photos Viewer dialogs; I was hoping that as I loop through each iteration, each window would be closed.
Thank you.