Tuesday, October 16, 2007

Catalyst

I've been trying out Django, so I was thinking, I wanted to try out the webframework for perl too, so I poked around and found Catalyst. Still in the midst of testing it.. and so far... it still seems a little unfrenly.......... but we'll see, I will update about it again.

Friday, October 05, 2007

Bulk resize with python

Recently I had to pick up python for a project. So as usual, it is easier and more fun for me to learn something if there is a purpose! So this time, since I'd been messing around with a new camera, I wanted to have something to bulk resize my pics. So I decided to write a script for it. And so here it is!
import Image, os

def make_smaller(path):
for item in os.listdir(path):
try:
image = Image.open(item)
image.thumbnail((583,389), Image.ANTIALIAS)
print 'Resizing: '+item
image.save('small/'+item)
except IOError: None

make_smaller('/home/widdlepuke/Desktop/Python module installers/test')

Very simple, and I must say, I do kinda like python now. I still like my perl though :p I am also currently messing with the Django framework. More on that next time.