Python PIL and Vista/Windows 7 .. show() not working ...
tjreedy at udel.edu
Tue Dec 1 00:40:42 CET 2009
> On Nov 30, 4:37 pm, David Bolen <db3l.... at gmail.com> wrote:
>> If that's the issue, there are various ways around it. You could
>> patch PIL itself (same function) to quote the filename when it is
>> constructing the command. Alternatively, the tempfile module has a
>> tempdir global you could set to some other temporary directory before
>> using the show() function (or any other code using tempfile).
>> -- David
> Thanks for the pointers David, this will give me some things to
> As for me, I'm a long time and regular Linux user with some XP tossed
> I use the PIL under XP at times, but this problem is happening to
> I know who is using both Vista and Windows and can't get the basic
> to work so I am trying to help. (I have access to a Win 7 VM for
> purposes at least).
> If I find a work-around or fix or concrete cause I'll post. In the
> if anyone has any other ideas or fixes/suggestions, please don't be
> shy :-)
How about forget PIL's show and its automagic behavior.
Use PIL's image save to write the image to a nice, known location, such
as C:/temp/pic.jgp -- nothing but alphanumerics + ':/.'
Next test how to run a known external viewer from a command window.
Then use os.system or subprocess to run it with the same command line.
Package the two lines as a myshow(params) function.
More information about the Python-list