win10给python起一个别名p
1、安装python
自行安装好python,确保安装成功。

2、编写bat脚本
在任意目录(我的目录是:C:\ZProgram\p_bat)编写一个脚本,脚本名称为:p.bat,脚本内容如下:
@echo off
python %*

3、添加环境变量
3.1、将python安装的位置添加到环境变量(系统环境变量)Path 中
3.2、将脚本的位置也加到环境变量Path 中

4、效果展示

自行安装好python,确保安装成功。

在任意目录(我的目录是:C:\ZProgram\p_bat)编写一个脚本,脚本名称为:p.bat,脚本内容如下:
@echo off
python %*


