怎么双击运行 python 代码? 将 .py 文件的默认打开程序设置成 python.exe 可实现双击运行 python 代码。 Python tkinter怎么才能脱离黑窗口 把写好的python程序文件的扩展名改为.pyw,系统就会调用pythonw.exe执行不带控制台的程序。