Making Python scripts run on Windows without specifying “.py” extension

前端 未结 4 1588
甜味超标
甜味超标 2020-12-01 05:52

I want to able to open a command prompt at the folder which contains a python script and just type in the script name without the .py and watch it run.

Following the

4条回答
  •  一生所求
    2020-12-01 06:07

    Create a file named 'personalisedCommand.cmd' in a path folder with this inside:

    @echo off python absolute/path/to/pythonScript

提交回复
热议问题