親測有效 python文件右鍵添加IDLE選項

py文件在利用過程中經常呈現右鍵貧乏Edit with IDLE選項 , 按照網上搜刮的方式試了一天 , 成果是右鍵可以添加Edit with IDLE選項 , 但該選項點擊無反映 , 本人兩臺電腦都裝有python , 經由過程對比 , 找到解決法子 。 如下:

需要這些哦
python3 win10-64bit
不需要東西
方式/
1初學Python , 按照教程設置軟件后發現右鍵如下圖所示 , 貧乏IDLE選項 , 而原右鍵如下右圖所示

親測有效 python文件右鍵添加IDLE選項



親測有效 python文件右鍵添加IDLE選項



2方式一:
win+R打開運行窗口 , 輸入regedit , 進入注冊表本家兒界面 , 點擊
【親測有效 python文件右鍵添加IDLE選項】HKEY_CLASSES_ROOT前面的箭頭睜開 , 選擇SystemFileAssociations

親測有效 python文件右鍵添加IDLE選項



親測有效 python文件右鍵添加IDLE選項



親測有效 python文件右鍵添加IDLE選項



3右鍵單擊SystemFileAssociations , 添加項.py , 右鍵單擊.py , 添加shell , 依次類推 , 形當作如下圖布局

親測有效 python文件右鍵添加IDLE選項



親測有效 python文件右鍵添加IDLE選項



4各參數如下截圖所示 , 沒有展示的截圖為默認 , 不要點竄 , 圖中路徑需要按照你軟件現實安裝路徑點竄 , 完當作后就可以利用了 。
最后一項數值名稱為
"C:\Program Files\Python36\pythonw.exe" -m idlelib "%L" %*
上面路徑按照現實安裝調整 。

親測有效 python文件右鍵添加IDLE選項



親測有效 python文件右鍵添加IDLE選項



親測有效 python文件右鍵添加IDLE選項



5方式二:
將.py導出后用TXT打開 , 代碼如下:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Python.File]
[HKEY_CLASSES_ROOT\Python.File\Shell]
[HKEY_CLASSES_ROOT\Python.File\Shell\editwithidle]"MUIVerb"="&Edit with IDLE""Subcommands"=""
[HKEY_CLASSES_ROOT\Python.File\Shell\editwithidle\shell]
[HKEY_CLASSES_ROOT\Python.File\Shell\editwithidle\shell\edit36]"MUIVerb"="Edit with IDLE 3.6 (64-bit)"
[HKEY_CLASSES_ROOT\Python.File\Shell\editwithidle\shell\edit36\command]@="\"C:\\Program Files\\Python36\\pythonw.exe\" -m idlelib \"%L\" %*"

猜你喜歡