[英]How to make .py files open directly into Idle
I'm not sure what I've done but for a moment my .py files kept asking me what to open them in. They used to open straight into Idle, but now I can't get that back. 我不确定自己做了什么,但是有一段时间我的.py文件一直问我要打开什么文件。它们曾经直接打开到Idle,但是现在我无法恢复。 I have to keep right-clicking and selecting "Edit with Idle".
我必须保持右键单击并选择“空闲编辑”。 Does anyone know how I can get it back to opening straight into Idle.
有谁知道我如何能将它恢复为直接进入空闲状态。
I have looked at other sources and they told me to set the default program to a batch file in 我查看了其他来源,他们告诉我将默认程序设置为
C:\Python32\Lib\idlelib
but that opens the .py file and a blank file. 但这会打开.py文件和一个空白文件。 Any ideas?
有任何想法吗?
right click > open with... > choose default program. 右键单击>打开方式...>选择默认程序。 select idle and make sure the box to always open with is checked
选择空闲,并确保选中始终打开的框
I had to change my idle.bat to get it to work 我必须更改我的idle.bat才能使其正常工作
@echo off
pythonw C:\Python26\Lib\idlelib\idle.pyw %1 %2 %3 %4 %5 %6 %7 %8 %9
it will open whatever you double clicked as well as a shell 它将打开您双击的任何内容以及一个外壳
Right-click on the .py
file and click on the Change
button right next to Opens With
. 右键点击
.py
文件,然后点击Opens With
旁边的Change
按钮。 Change the application to IDLE and you're done! 将应用程序更改为IDLE即可完成!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.