Answer the question
In order to leave comments, you need to log in
Is there a way to track the state of a Windows application from Python?
I have a windowed windows application launched from a python script, which, after the end of data processing, does not close automatically. Now we have to roughly calculate the running time of the application based on the amount of data transferred to the windows application, with a small margin. And then stop the time.sleep() script.
Is there any way to track from python when data processing has finished without waiting for the external application to exit?
Answer the question
In order to leave comments, you need to log in
As an option, watch the list of processes in a loop and wait until the desired one is completed.
You can do it with this . Documentation is available, how to get a list of processes is described in it
In such a general formulation of the question, the answer is no. It is necessary to study specifically this application, what "traces" it leaves. One option has already been suggested by AlexNest (if a separate process is started to process the data). Another thing that comes to mind first - does the application create any files? Well, and so on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question