PIL + show() + Vista
Tim Golden
mail at timgolden.me.uk
Fri Nov 30 10:47:56 EST 2007
Méta-MCI (MVP) wrote:
[Excuse my execrable French below]
> Sorry, I don't understand english. But, with Babelfish-translation, I
> recovered essence...
> (you should learn French ; yes! yes! yes!)
Vraiment!
> I have just try on another CPU, with a very new Vista-premium
> (configuration of exit of factory). The assoc est made with the
> WindowsPhotoGallery.exe who don't respect the WAIT
Ceci fonctionne sur XP et Vista, esperant jusqu'a que
termine le ImageViewer. C'est possible de utiliser le
subprocess, mais j'oublie toujours les options differents.
This works on XP and Vista, waiting until the ImageViewer
has exited. You could use the subprocess module, but I
never remember the different options.
<code>
import os
filepath = "c:/temp/test.jpg"
assoc = os.popen ("assoc .jpg").read ().splitlines ()[0]
_, filetype = assoc.split ("=")
ftype = os.popen ("ftype %s" % filetype).read ().splitlines ()[0]
_, exe = ftype.split ("=")
#
# NB *must* use correct slashes
#
cmd = exe.replace ("%1", os.path.normpath (filepath))
os.system (cmd)
</code>
TJG
More information about the Python-list
mailing list