[python-win32] IE (ocx) OK, but python never close
Vernon Cole
vernondcole at gmail.com
Wed Feb 9 16:11:50 CET 2011
Michel:
Without actually analyzing you script, I see one thing immediately...
You expect Windows and Internet Explorer to actually respond quickly.
Your timeout for the shutdown is 1/4 second. When last I tried to automate
Windows functions, I gave up on using fixed timers, because sometimes it
would take a minute or more for my target window, or Windows itself, to
respond. My ugly work-around was (in the Python script) to watch for the
target window to change size, so I knew it reacted to the first input before
sending the next. Without adaptive timing, my delays had to be ridiculously
long, because usually response _was_ timely. (I finally ended up displaying
a new window which was a cartoon of a skeleton looking at a computer screen
which displayed "PLEASE WAIT". It made the correct impression on the users,
and they kept their hands off the mouse.)
Of course, that may not be the problem at all, and your long script may
already allow for a slow system.
--
Vernon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110209/4c5cf88e/attachment.html>
More information about the python-win32
mailing list