Windows - window status (Running vs Not Responding)

Tim Golden mail at
Fri Apr 11 15:46:24 EDT 2008

rdahlstrom wrote:
> On Apr 11, 1:45 pm, rdahlstrom <roger.dahlst... at> wrote:
>> Does anyone know how to determine the window status (Running or Not
>> Responding)?  I've tried various methods with no success...
>> This would be on a variety of Windows systems, but all at least XP,
>> and mostly server 2003.  Everyone will have Python 2.5.1 on them, and
>> the script would be running locally.
>> Any ideas?
> Basically, I'm looking for something similar to the Process.Responding
> property in System.Diagnostics...

Well one (slightly drastic) possibility might be to use IronPython [1]
or Python.NET [2] to invoke the .Net functionality directly. AFAIK there
is no direct alternative: I believe that WMI can be a useful match
for System.Diagnostics but doesn't deal with windows (ie user-interface
elements). Presumably you could find a top-level window for each
process, using something vaguely like this [3] coupled with this [4]
and send it a suitable SendMessage to "ping" it. Haven't done it myself 
but can't see why it shouldn't work.

All a bit handwavey but maybe it'll point you somewhere...



More information about the Python-list mailing list