這個技巧蠻好用的,我把它翻譯成:
嘗試...不成,就...
測試:
try:
Image.open(infile).save(outfile)
except IOError:
print("cannot convert",infile)
這個技巧蠻好用的,我把它翻譯成:
嘗試...不成,就...
測試:
try:
Image.open(infile).save(outfile)
except IOError:
print("cannot convert",infile)