I have a pythonscript run.py that I currently run in the command line. However, I want a start.py script either in python (preferably) or .bat, php, or some other means that allows me to make it such that once run.py finishes running, the start.py script will reexecute the run.py script indefinitely, but ONLY after the run.py finishes executing and exits.
Sample Steps:
– Start.py is run that starts Run.py
– Run.py prints “hello” for 3 times after 5 seconds and exits normally or abnormally
– Start.py knows Run.py finished/closed and reexecutes run.py
How do I accomplish this?
If it’s just a Python script, you could do this:
But a better approach would be to make your other Python file modular and run it properly via the second Python file.