[wxPython-users] Re: How do I poll for irc data while running
GUI?
Robin Dunn
robin at alldunn.com
Mon Aug 20 16:15:40 PDT 2007
Grant Edwards wrote:
> On 2007-08-16, Lucas <lucaslevin at gmail.com> wrote:
>
>> I'm trying to make an IRC client, and I was originally
>> thinking to do socket.recv() on a timer, but now I realize if
>> nothing happens for a while, the program will freeze (I think)
>> while it waits to receive something! I can't figure out how to
>> get it to work.
>>
>> I really don't want to use multi threading. Would there be
>> some way with the Idle event or calling update during the
>> recv?
>
> Isn't there a way to attach read and write handlers to a
> file/socket object? Or am I thinking of GTK?
>
You're thinking of GTK. wx doesn't yet have a way to get wx events for
read/write notifications, although there was some talk about adding a
patch for it in 2.9. For now the best you can do is to use one of the
other async libs in another thread.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list