On Tue, Jan 17, 2012 at 10:12 PM, Bruno Bigras <
bigras...@gmail.com> wrote:
> If I run the following code, I only see "task2 started". It runs fine
> without the "WinWaitActive" lines.
>
> I guess win32com or AutoItX may not work with gevent. I wonder if I
> should use a thread instead.
Yes, try the thread pool.
Instead of
auto.WinWaitActive("test2.txt - Notepad")
do
gevent.get_hub().threadpool.apply(auto.WinWaitActive, "test2.txt - Notepad")
Note, that WinWaitActive must be thread-safe.