Re: Simple script to make .png thumbnails from .zip archive...

2006-06-20 Thread K P S
Thanks a lot! This is what I ended up with. (I would like to get rar archive support, but browsing the web it looks like rar support isn't in any python library (yet)) :-( Anyway, I was able to use the below code unchanged to create thumbnails in nautilus based on the first .jpg file in a .zip ar

Re: Simple script to make .png thumbnails from .zip archive...

2006-06-19 Thread K P S
Thanks everyone. One last thing (I hope). How can I get the name of just the first file in a zipfile? I see routines to list all the files in a zip archive, but I don't see any to list only the first, or only the second, etc. It doesn't look like zipfile is storing info in a useful array that I

Re: Simple script to make .png thumbnails from .zip archive...

2006-06-19 Thread K P S
.ANTIALIAS) > image.save (file + '.thumb.png') > except: > print 'Skipping file', file > > Links: > http://docs.python.org/lib/lib.html - Python Library Reference > http://www.pythonware.com/library/pil/handbook/image.htm - The Image > Mod

Simple script to make .png thumbnails from .zip archive...

2006-06-18 Thread K P S
Hi. I'm looking for a small script that will take a .zip archive and pull the first .jpg from the archive and convert it to a .png. The reason for this is I want to have tuhmbnails for these archives in nautilus under gnome. I would like something similar to the following code, which will pull