How to start IDLE (Python editor) without using th

2019-01-14 00:15发布

I'm trying to teach Komodo to fire up IDLE when I hit the right keystrokes. I can use the exact path of the shortcut in start menu in the Windows Explorer location bar to launch IDLE so I was hoping Komodo would be able to use it as well. But, giving this path to Komodo causes it to say that 1 is returned. This appears to be a failure as IDLE doesn't start up.

I thought I'd avoid the shortcut and just use the exact path. I go to the start menu, find the shortcut for IDLE, right click to look at the properties. The target is grayed out, but says "Python 2.5.2". The "Start in" is set to, "C:\Python25\". The "Open File Location" button is also grayed out.

How do I find out where this shortcut is really pointing? I have tried starting python.exe and pythonw.exe both in C:\Python25, but neither starts up IDLE.

10条回答
SAY GOODBYE
2楼-- · 2019-01-14 00:24

there is a .bat script to start it (python 2.7).

c:\Python27\Lib\idlelib\idle.bat
查看更多
一夜七次
3楼-- · 2019-01-14 00:28

Here's another path you can use. I'm not sure if this is part of the standard distribution or if the file is automatically created on first use of the IDLE.

C:\Python25\Lib\idlelib\idle.pyw
查看更多
仙女界的扛把子
4楼-- · 2019-01-14 00:36

If you just have a Python shell running, type:

import idlelib.PyShell
idlelib.PyShell.main()
查看更多
放荡不羁爱自由
5楼-- · 2019-01-14 00:37

In Python 3.2.2, I found \Python32\Lib\idlelib\idle.bat which was useful because it would let me open python files supplied as args in IDLE.

查看更多
爱情/是我丢掉的垃圾
6楼-- · 2019-01-14 00:39

Python installation folder > Lib > idlelib > idle.pyw

Double click on it and you're good to go.

查看更多
在下西门庆
7楼-- · 2019-01-14 00:41

You can also assign hotkeys to Windows shortcuts directly (at least in Windows 95 you could, I haven't checked again since then, but I think the option should be still there ^_^).

查看更多
登录 后发表回答