官方描述:
New in version 3.3.
The Python launcher for Windows is a utility which aids in the location and execution of different Python versions. It allows scripts (or the command-line) to indicate a preference for a specific Python version, and will locate and execute that version.
也就是说在3.3版本之后,假如电脑上安装了这些版本,保证Python在环境变量中,从命令行调用python:
py - 2
py - 3
会分别调用Python2和Python3
在Python脚本中,在.py文件头部添加:
#!python2
#!python3
分别使用Python2或者Python3执行脚本。