Python Try finally 语句 Python 打开文件open方法 Python try finally 示例 Python Try finally 语句 #!/usr/bin/python try: fh = open("testfile", "w") fh.write("This is my test file for exception handling!!") finally: print "Error: can\'t find file or read data" Python 打开文件open方法 Python try finally 示例