At my work we had the same problem. We found that the best solution was to use a thread with the code to handle the model dialog. This worked best for us because the only models in our product are the error messages, and using a thread gave us the ability to check and see if the modal dialog was found.
In this post there is some example code. I will post up a more complete solution when I get to work on monday. http://groups.google.com/group/comp.lang.python/browse_thread/thread/ea9a63aaeaecb591/ee7ec7cf2d12801d?lnk=gst&q=findtopwindow&rnum=1&hl=en#ee7ec7cf2d12801d -- http://mail.python.org/mailman/listinfo/python-list