Problem with custom events in wxpython

Frank Niessink frank at niessink.com
Mon May 12 05:17:16 EDT 2008


Hi Jimmy,

2008/5/12 Jimmy <mcknight0219 at gmail.com>:
> On May 11, 11:27 pm, "Frank Niessink" <fr... at niessink.com> wrote:
>  > 2008/5/11 Jimmy <mcknight0... at gmail.com>:
>  > > I have a class A handling some data processing work and another class
>  > > B of GUI matter. I need GUI to display information when data in A is
>  > > updated.
>  > > I know cutom events in wxpython may work.
>  >
> > You may want to look at the pubsub module.
>
>  it works! however, it seems the message can not be exchanged between
>  processes :(
>  actually what I want to do is let a running process send data to GUI
>  process and display it

Well, that is some crucial information you didn't mention in your
original question... I guess for the communication between processes
you can use the regular python batteries available or something like
Pyro. In your GUI process you can use a thread to listen/wait for new
information to display and then send it to the main (GUI) thread. See
http://wiki.wxpython.org/LongRunningTasks

Cheers, Frank



More information about the Python-list mailing list