Can I set IDLE to start Python 2.5 by default?

◇◆丶佛笑我妖孽 提交于 2019-12-06 04:44:46

You can easily create or edit the right-click properties for a file.

To edit the right-click menu for a particular file extension:

  1. Run assoc .py from the command line and note the name of the association:

    C:>assoc .py
    .py=Python.File

  2. Run regedit.exe.

  3. Browse to HKEY_CLASSES_ROOT\Python.File\shell.
  4. Create a key under shell called Edit with IDLE (or however you want it to show up in the menu).
  5. Create a key under Edit with Idle called command.
  6. Edit the default value to run the command you want. Use "%1" to insert the name of the right-clicked file. Something like:

    c:\python25\pythonw.exe c:\python25\lib\idlelib\idle.pyw "%1"

Alternatively, just save the following as idle.reg and double-click it to insert this value in the registry.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Python.File\shell\Edit with IDLE\command]
@="\"C:\\Python25\\pythonw.exe\" \"C:\\python25\\Lib\\idlelib\\idle.pyw\" \"%1\""

Unless you need Python 2.7 for some reason, the simplest way to achieve this in Windows is to uninstall Python and reinstall Python 2.5 again.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!