[Tutor] Mainloop conflict
Dave Angel
d at davea.name
Fri Jul 29 17:29:20 CEST 2011
On 07/29/2011 11:08 AM, Christopher King wrote:
> I was afraid of that.
>
Please don't top-post. It's becoming more prevalent on this list, but
it makes things very confusing. I need to put my response just after
yours, but then the other relevant pieces are out of order.
> On Thursday, July 28, 2011, Dave Angel<d at davea.name> wrote:
>> On 07/28/2011 08:32 PM, Christopher King wrote:
>>> Dear Tutor Dudes,
>>> I have a socket Gui program. The only problem is that socket.recv
> waits
>>> for a response, which totally screws Tkinter I think. I tried making the
>>> timeout extremely small (it was alright if I didn't receive anything, I
>>> was excepting that a lot) but I think that screwed socket. Anyone have
> words
>>> of wisdom.
>>>
>>> Sincerely,
>>> Me
>>>
>> Sure:
>>
>> Do the socket I/O on a separate thread.
>>
>> --
>>
>> DaveA
>>
>>
>
Threads aren't that tough in Python.
Threads aren't always helpful in CPython, because of the GIL. But this
is one case where they are. And somebody has pointed out a library
which presumably hides the thread details from you.
--
DaveA
More information about the Tutor
mailing list