python with PIL : problem showing images in Win 7

Jean-Claude Arbaut <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
I just installed Python 2.7.2 and PIL 1.1.7. In pil-handbook.pdf there 
is a trivial example (slightly modified here to change image name):

import Image
im = Image.open("fruit.ppm")
im.show()

Everything runs well, except I get an error from Windows image viewer, 
saying the file has been deleted.
The problem seems to come from line 99 in ImageShow.py,
     return "start /wait %s && del /f %s" % (file, file)
Looks like the del doesn't wait for start to finish, hence the file 
doesn't exist when the viewer
is launched. If I try instead :
     return "start /wait %s" % file
Then the image is shown as expected. So there is a workaround, but the 
file is not
destroyed afterwards.

Is there a cleaner way to solve the problem, e.g. forcing a wait before 
del ?

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.