I tried to right click the file and rename it, but it won't even show me the extension so that I could delete it. I also tried going to properties and I couldn't do it from there either. I didn't code directly with the Tkinter of python, I used a custom made graphics library that came with my book.
答案 0 :(得分:3)
你是正确的,因为你只需要重命名它 - 不幸的是,现代版本的Windows隐藏了扩展程序,因此您无法轻易修改它。
我倾向于将Windows设置为始终显示扩展名(因为这会在计算机范围内修复此问题),但如果这是不受欢迎的或不可能,则可以始终使用命令提示符:
cd C:\Path\To\File
ren MyPythonScript.py MyPythonScript.pyw
希望这有帮助。