我只需要安装它们。然后我使用“文件类型设置”/“上下文菜单”/search:“py”下http://defaultprogramseditor.com/的免费(和便携式)软,选择.py文件,并通过复制名为“open with IDLE”的现有命令为2 IDLE添加一个“打开”命令,将名称更改为IDLE 3.4.1/2.7.8,并替换程序路径中各自版本的文件编号。现在我只需右键单击.py文件并选择我想使用的IDLE。如果你愿意,也可以找直接口译员。
@echo off
title Python2 Launcher by KinDa
cls
echo Type the exact version of Python you use (eg. 23, 24, 25, 26)
set/p version=
cls
echo Type the file you want to launch without .py (eg. hello world, calculator)
set/p launch=
path = %PATH%;C:\Python%version%
cd C:\Python%version%
python %launch%.py
pause
对于Python3
@echo off
title Python3 Launcher by KinDa
cls
echo Type the exact version of Python you use (eg. 31, 32, 33, 34)
set/p version=
cls
echo Type the file you want to launch without .py (eg. hello world, calculator)
set/p launch=
cls
set path = %PATH%:C:\Python%version%
cd C:\Python%version%
python %launch%.py
pause