windows - How do I run a python script, from a batch file, that acts as a subprocess of the cmd instance? -
i'm trying use batch file run python script when batch session ends (termination example) python script close.
for example, if wanted reverse thing (python->batch). use subprocess module.
how can achieve this?
this relevant line in batch file:
python run.py %*
which runs python script, upon terminating it, python script keeps running
shell script should execute run.py :
python run.py
if want include command line arguments run.py shell script like:
python run.py %1 %2
%1
, %2
command line arguments.
your batch script can't end unless python file executed. make sure had done things correctly.
wiki
Comments
Post a Comment