I have 10 python windows that are running a code. Every script has specific word in output (running instance1, running instance2,running instance3..)...
sometimes script crashes and [try: except:] method doesn't work on this.
So I need a way to loop trough open python windows and ask: does the any of python windows contain in their output word 'running instance1', or 'running instance2' and if it doesn't then 'do this'...
EDIT: Popen and subprocess can be used when you are calling a .py from another .py. I need something to read output of already running .py program. I need a way to connect to its output window over PID or name like python.exe.
Anyone?