[python-win32] simulate DoEvents by python/wxpython

James Hu jhu at metrigenix.com
Thu Oct 27 21:39:53 CEST 2005


Thanks, say there are two threads, one is wxGUI, another is camera,
which will send lots of data (1280X1280) to wxGUI, or notify wxGUI by
event to retrieve it after a frame of image is ready. If synchronized
well, this approach should work as well.

James


-----Original Message-----
From: python-win32-bounces at python.org
[mailto:python-win32-bounces at python.org] On Behalf Of Tim Roberts
Sent: Thursday, October 27, 2005 1:49 PM
To: python-win32 at python.org
Subject: Re: [python-win32] simulate DoEvents by python/wxpython

On Wed, 26 Oct 2005 14:10:07 -0400, "James Hu" <jhu at metrigenix.com>
wrote:

>I  need to simulate DoEvents in VB by python/wxPython, 
>
>My application needs to capture live image in a loop until one specific
>button pressed
>
>Multi-thread is also not very good solution, for there are big number
of
>data to exchange between the two threads.
>  
>

Threads all share the same address space.  There is no need to 
"exchange" data at all.

A separate thread is almost certainly the right way to do what you ask.

You can use Python Queues to send messages between the threads, to 
signal when an image is available, or to signal that a worker thread 
should exit.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32


More information about the Python-win32 mailing list