@@ -0,0 +1,497 @@
+#Convert filetype%0A%0Afrom PIL import Image%0Aimport os%0A%0A%0Adef get_imlist(path):%0A    return %5Bos.path.join(path,f) for f in os.listdir(path) if f.endswith('jpg')%5D%0A%0Apath = raw_input(%22Enter path to directory%22)%0Afilelist = get_imlist(path)%0Aext = raw_input(%22Enter the extension:%22)%0Afor infile in filelist:%0A    outfile = os.path.splitext(infile)%5B0%5D + %22.%22+ext%0A    if infile != outfile:%0A        try:%0A            Image.open(infile).save(outfile)%0A        except IOError:%0A            print %22cannot convert%22, infile%0A%0A

Create change_extension.py