# 按钮点击一次后,设置按钮不可点击状态 self.Command4.configure(state=DISABLED) # 程序执行完后,恢复按钮的可点击状态 self.Command4.config(state="normal")