Ognjen Bezanov wrote:
> ext = thefile.split('.') #get the file extension
> ext[1] = ext[1].lower() #convert to lowercase
As a side note, ext[1] will be the first extension:
>>> 'foo.bar.ogg'.split('.')[1]
'bar'
I'd advise ext[-1], the last element of the splitted list.
>>> 'foo.bar.ogg'.split('.')[-1]
'ogg'
--
http://mail.python.org/mailman/listinfo/python-list
