I am unable to post code for this sorry, but I am trying to run a python script at all times from another python script which creates a system tray. This system tray will show if the program is correctly running or not.
I have tried a few methods so far, the most promising method has been using something like:
p = subprocess.Popen([xxx, xxx], stdout=PIPE, stderr=PIPE)
Then I check if stderr
has any output meaning there’s been an error.
However, this only works when I deliberately make an error occur (using the wrong file path) and nothing happens when I use the correct file path as the program never terminates.
So the main issue I’m having is that because I want the program to be running at all times it never terminates unless there’s an error. I want to be able to check that is it running so the user can check the status on the system tray.