strangethingspy

1

votes
1

answer
0

views

Subprocess.Popen not running another script

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 subproce...
strangethingspy
0

votes
1

answer
12

views

Using subprocess.call to execute python file?

I am using subprocess.call in order to execute another python file. Considering that the script that will be called will never terminate the execution as it's inside an infinite loop, how can I make it possible for the original script to continue the execution after the subprocess call ? Example: I...
strangethingspy
0

votes
0

answer
5

views

How to execute file python script which is in while loop without interrupting it?

I have to execute a python script which is costantly in while loop, this is script2 while True: #do something time.sleep(30) Now I have script1 which does all the calculations and then I need to execute the script2. I have tried execfile but it didn't work and I had a lot of issues. I don't know ho...
strangethingspy
0

votes
2

answer
35

views

Python: How to write error in the console in txt file?

I have a python script which every 10 minutes sends me an email with everything written in the console. I am running this with the crontab in my ubuntu 18.04 vps. Sometimes it doesn't send the mail so I assume that when an error happens execution stops but how can I get the errors to be written in a...
strangethingspy