Python Forum
how to run a series of py scripts - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: how to run a series of py scripts (/thread-25742.html)



how to run a series of py scripts - davidm - Apr-10-2020

Hi Just starting out on the python path and would like to know the best way to run all the 4 steps below in one operation (batch file in my day)

1. pip3 install tensorflow pandas numpy matplotlib yahoo_fin sklearn
2. script1.py # if successful continue else display error and skip following scripts
3. script2.py # if successful continue else display error and skip following script
4. script3.py

Thanks for any help


RE: how to run a series of py scripts - Larz60+ - Apr-10-2020

create a master python script that dispatches the other scripts


RE: how to run a series of py scripts - davidm - Apr-10-2020

Thanks Larz, went of and Googled your suggestion, found:
https://stackoverflow.com/questions/24595402/sequentially-running-multiple-python-programs-with-sys-using-batch
Will include a log file to keep track of success or fail of each step and will read that at beginning of each prog.py so I know if to continue or not.