"Edit with IDLE" .pyw 文件未显示

"Edit with IDLE" not showing with a .pyw file

我最近更改了 Python 版本,但是当您右键单击 Python 文件时没有显示“使用 IDLE 编辑”。

所以我进入 Regedit 并更改了这个:

Python.File\Shell\Edit with IDLE 3.8 (64-bit)Python.NoConFile\Shell\Edit with IDLE 3.8 (64-bit)中,command中的文件都是这样填充的:

"C:\Users\PC\AppData\Local\Programs\Python\Python38\pythonw.exe" -m idlelib "%L" %*

但是“使用 IDLE 编辑”选项仅在 .py 文件中显示。


带有 .py 个文件:

带有 .pyw 文件:

所以我的问题是:为什么 Edit with IDLE 不显示 .pyw 文件?

我尝试在完全删除后重新安装 Python,重新启动(查看 Regedit 更改?)但没有任何效果。
有什么想法吗?


编辑HKEY_CLASSES_ROOT\.py指的是HKEY_CLASSES_ROOT\Python.FileHKEY_CLASSES_ROOT\.pyw指的是HKEY_CLASSES_ROOT\Python.NoConFile(没有改变)。

最后我自己解决了问题

事实上,.pyw 文件在资源管理器中的描述是 “PYW 文件”,因此它没有附加到 .pyw在注册表中。

我不知道为什么,但是因为我将 .pyw 扩展附加到

C:\Users\PC\AppData\Local\Programs\Python\Python38\pythonw.exe

它没有附加到 Regedit 中的 .pyw

所以我只是点击了“打开方式”并选择了

C:\Windows\pyw.exe

一切正常。


编辑:

I don't know why, but because I attached the .pyw extension to

 C:\Users\PC\AppData\Local\Programs\Python\Python38\pythonw.exe

it wasn't attached to .pyw in Regedit.

Python38 文件夹不存在,我必须输入 Python38-32