标签:import python int normal warning cep 弹出框 .sh style
import tkinter.messagebox try: fileContent = open("abnormal.txt") fileContent.close() print("over") #把异常消息赋予一个"ex"变量 except Exception as ex: print(ex) tkinter.messagebox.showinfo("Alert",ex) tkinter.messagebox.askyesnocancel("askyesnocancel","Error Message:\n%s"%ex) tkinter.messagebox.showinfo("showinfo","Error Message:\n%s"%ex) tkinter.messagebox.showwarning("showwarning","Error Message:\n%s"%ex) tkinter.messagebox.showerror("showerror","Error Message:\n%s"%ex) tkinter.messagebox.askquestion("askquestion","Error Message:\n%s"%ex) tkinter.messagebox.askokcancel("askokcancel","Error Message:\n%s"%ex) tkinter.messagebox.askretrycancel("askretrycancel","Error Message:\n%s"%ex)
标签:import python int normal warning cep 弹出框 .sh style
原文地址:http://www.cnblogs.com/liuyang92/p/7450665.html