1.消息框 tkMessageBox.py import tkinter from tkinter import messagebox def cmd(): global n global buttontext n += 1 if n==1: messagebox.askokcancel('Python Tkinter', 'askokcancel') buttontext.set('askquestion') elif n==2: messagebox.askquestion('Python…
localpathname为当前路径,需要保存图片的位置,根据自己的实际路径设置,usedpathname用来保存打开的文件位置,方便下次打开文件对话框以上次的路径为默认路径. global usedpathname; global localpathname; localpathname='D:\Program Files\MATLAB\R2013a\bin\毕业设计\图片\';if ~ischar(usedpathname)[filename, pathname, filterindex]…