python - 如何漂亮地打开Tkinter程序?

标签 python python-2.7 tkinter

当我打开一个 Tkinter 程序时,打开了 3 个东西:

  1. 我的计划
  2. 空闲(外壳)
  3. 黑屏(python命令行)

如何屏蔽第二个和第三个以获得清晰的 View ?谢谢。

最佳答案

TkinterProgram.py 文件在使用命令提示符或终端的控制台基础上运行,当您构建 GUI 应用程序而不是控制台应用程序时使用 TkinterProgram.pyw 文件。

.py 用于构建控制台应用程序

.pyw 用于构建 GUI 应用程序

换句话说,只需将 .pyw 扩展名添加到您现有的应用程序并双击运行它,这样您将隐藏 IDLE、命令提示符/终端。

来源:http://filext.com/file-extension/PYW

关于python - 如何漂亮地打开Tkinter程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16541031/

相关文章:

python - 在 QDialog reject() 上优雅地终止 QThread

python - 如何使用 read_sql 在 Pandas 中指定 na_values?

python - 高效地从字符串中每 n 个字符获取 n 个字符

python - pygame连续和同时按键输入

Python3 askopenfilename错误

python - Scikit 图像行进立方体

如果以 ""或 ","开头,python 将删除字符串的开头

python-2.7 - Graphite Web 错误日志,OperationalError : no such table: auth_user

python - 当我将 update() 与 tkinter 一起使用时,我的 Label 会写另一行而不是重写相同的文本

python - tkinter treeview - 拖放?