在 Windows 中运行 Python 的 IDLE
我搞乱了我的 IDLE 快捷方式。在 Windows 中从 cmd.exe shell 启动 IDLE 的方法是什么?
I messed up my IDLE shortcut. What is the way to start IDLE from the cmd.exe shell in Windows?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在我的系统上,运行
C:\Python26\lib\idlelib\idle.py
从命令提示符启动空闲。显然,如果您的主要 Python 目录不是 C:\Python26\,您将需要调整路径。看起来您也可以通过同一目录中的
idle.pyw
或idle.bat
启动它。On my system, running
C:\Python26\lib\idlelib\idle.py
launches idle from the command prompt. Obviously you will need to adjust your path if your main Python directory isn'tC:\Python26\
.It looks like you could also launch it via
idle.pyw
oridle.bat
in that same directory.您只需在“我的电脑属性”的“环境变量”选项卡中添加路径即可 ->高级为
c:\Python27\Lib\idlelib
。添加此路径后,只要您想运行 IDLE,只需在cmd
中写入idle.pyw
即可。只需确保将文件夹名称替换为您拥有的任何目录名称即可。
You can just add a path in your Environment variables tab in My Computer Properties --> Advanced as
c:\Python27\Lib\idlelib
. After adding this path just writeidle.pyw
incmd
whenever you want to run IDLE.Just make sure you replace the folder name with whatever directory name you have.