I try to write some batch that can autorun my python scripts.Here is my batch file:
@echo off
:: do something here
pythonw xx.py
rem run python script in the backgroud
rem but batch stops here, doesn't run the rest code
:: do something else again
So how can I fix this. Any help will be appreciated!
Related question:
Running Python Script as a Windows background process
You should be able to get the batch file to keep running by executing the Python script using Windows start
command.
So in your case the batch file should look something like:
@echo off
:: do something here
rem Run python script in the backgroud
start "title" /b pythonw xx.py
:: do some more stuff...
Este artigo é coletado da Internet.
Se houver alguma infração, entre em [email protected] Delete.
deixe-me dizer algumas palavras