wilson.t.thompson at gmail.com
Sun Apr 27 12:34:02 CEST 2008
i was trying to convert all images in a folder to another type and
save the new images in a separate folder.for that i wrote a class and
coded some part
print "no such folder,exits program"
if not os.path.isdir(self.outfldr):
for x in os.listdir(infldr):
self.origlist=[os.path.normpath(os.path.join(self.infldr,x)) for x in
the self.origlist returns a list of filenames in infolder.I would
like to get them as 'C:\\myimages\\imageone' instead of 'C:\\myimages\
\imageone.jpg' sothat i can add a diff extension to all those strings
in the list and save in diff format(ie change 'C:\\myimages\\imageone'
to 'C:\\myimages\\imageone.gif ' and save in gif format).but i don't
know how to remove those extension from the namestring ..can someone
More information about the Python-list