I have script1.py which does some calculations and sends some emails and script2.py (is used to do some updated in a Mysql DB) which is in an infinite loop until some things are satisfied.
At the end of the calculations made on script1, I need to execute script2.py and to do this I am using subprocess.Popen(["python", "script2.py"])
now when debugging this, I see that it goes inside script2 and it works but when the execution of script1 ends I see that the script2.py stops its execution.
Is there another module used to do this kind of things, because it's not working properly ?
EDIT: I need to execute script1.py in order to execute script2.py but when using subprocess.Popen() the script1 waits for the script2 to terminate the execution. I need a way to execute script2 and let it run and terminate script1