Batch run Python script

create

Create a script.bat file in a directory
such as D:\Code\VimCode\Python_auto\Scriptin

Edit script.bat file

write

@python.exe D:\Code\VimCode\Python_auto\Script\test.py %*
@pause

The path here is changed according to the actual situation.

usage

Every time you want to test the script written in the future, copy the script to D:\Code\VimCode\Python_auto\Script, and rename it test.py.
Double-click script.batthe file to complete the operation

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325279348&siteId=291194637