Python PIL and Vista/Windows 7 .. show() not working ...

Stephen Hansen apt.shansen at gmail.com
Mon Nov 30 14:01:46 EST 2009


On Mon, Nov 30, 2009 at 9:57 AM, Esmail <ebonak at hotmail.com> wrote:

> Hello all.
>
> I am using the PIL 1.1.6 and Python 2.6.x under XP without any
> problems. However, I can't display any images under Vista
> or Windows 7. I could understand Windows 7 as it's relatively
> new, but Vista has been around for a bit.
>
> Sample code:
>
>  import Image
>
>  im = Image.open('c://mypic.jpg')
>  im.show()
>

Totally a guess, but did you try "c:\\mypic.jpg"?

\ is the path separator on windows, not /. A / will work in many situations,
but doubling it might cause problems perhaps (especially since you never
have to double forward-slashes, unlike back slashes)

--S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091130/4b9e5261/attachment-0001.html>


More information about the Python-list mailing list