Python2 and python3 the IDLE command added to the desktop

Installed on the computer Python2.7 and Python3.8, are done by installing the installation file downloaded in www.python.org.

Win10 system, Thinkpad E480 laptop.

The installation is complete, just under the respective directory

D:\python27\

D:\python3\python38\

Each directory has a python.exe and pythonw.exe.

After installation, the environment variable path already exists

D: \ python3 \ python38 \ and D: \ python3 \ python38 \ Scripts.

Manual to D: \ python27 \ and D: \ python27 \ Sripts also added into it.

When the command line Python -V, the version is 3.8.0.

Search the Internet search, there are ways that the name of the executable file to get rid of. A bit uncomfortable.

Find command to find the IDLE command line, found in IDLE.bat libs \ idlelib \ under to achieve.

python27 of idle.bat

@echo off

rem Working IDLE bat for Windows - uses start instead of absolute pathname

start idle.pyw %1 %2 %3 %4 %5 %6 %7 %8 %9

Meaning that close echo, comments, start idle.pyw under the same directory, double-click idle.bat, no response.

Also looked python38 of idle.bat

@echo off

rem Start IDLE using the appropriate Python interpreter

set CURRDIR=%~dp0

start "IDLE" "%CURRDIR%..\..\pythonw.exe" "%CURRDIR%idle.pyw" %1 %2 %3 %4 %5 %6 %7 %8 %9

Consciousness is close echo, comments, set CURRDIR variables, start pythonw.exe to perform idle.pyw.

Double-click idle.bat, can occur in python 3.8.0 IDLE command line.

python2.7 the IDLE can not be executed, the order is estimated that path leads to the problem, the call is python3.8 executable file.

Wondering if idle.bat python2.7 can be used instead of using idle.bat python3.8.

Copy start "IDLE" "% CURRDIR% .. \ .. \ pythonw.exe" "% CURRDIR% idle.pyw"% 1% 2% 3% 4% 5% 6% 7% 8% 9 to the python2.7 IDLE, can really perform.

Add the respective IDLE.bat shortcut to the desktop, it is solved.

Guess you like

Origin www.cnblogs.com/darkshitlord/p/12060192.html
Recommended