这个技巧蛮好用的,我把它翻译成:
尝试...不成,就...
测试:
try:
Image.open(infile).save(outfile)
except IOError:
print("cannot convert",infile)
这个技巧蛮好用的,我把它翻译成:
尝试...不成,就...
测试:
try:
Image.open(infile).save(outfile)
except IOError:
print("cannot convert",infile)