Python: How can I make my tkinter app exit properly?

折月煮酒 提交于 2019-12-24 01:43:27

问题


I need to know how to do this on a mac because whenever I try quitting it, I have to force quit it. Is there a proper way when the user clicks the exit button that Tkinter will exit normally?


回答1:


I figured out how. I just put a simple exit() command after the main loop.



来源:https://stackoverflow.com/questions/5427875/python-how-can-i-make-my-tkinter-app-exit-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!