Python:如何使我的tkinter应用程序正常退出? [英] Python: How can I make my tkinter app exit properly?
本文介绍了Python:如何使我的tkinter应用程序正常退出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要知道如何在Mac上执行此操作,因为每当我尝试退出它时,都必须强制退出它.当用户单击Tkinter正常退出的退出按钮时,是否有适当的方法?
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?
推荐答案
我知道了如何做.我只在主循环后放了一个简单的exit()
命令.
I figured out how. I just put a simple exit()
command after the main loop.
这篇关于Python:如何使我的tkinter应用程序正常退出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文