Check if context window is open in script?

 From:  local306
9515.1 
Is there a way via scripting to check whether a context window is open i.e.) if I'm drawing a circle and it's asking for the radius or diameter.

Reason being is that I would like to map each of the orthogonal views to my numpad 1, 3, and 7 values similar to other 3D apps. Problem is that if I go to punch in a value when a context window is open using my numpad, the app will jump to one of my ortho views should I have used one.

I'd like to check whether a context window is open, and if not, then proceed with setting the appropriate view. Otherwise, don't interfere with numpad input for quickly setting values when using tools.