Problem in threading
Sbaush
sbaush at gmail.com
Thu Feb 2 09:23:16 EST 2006
Hi all.
I've a problem with thread in python.
My applications has a GUI that has some button.
I've a MVC-like architecture.
If i click on a button there is this effect:
view.button_1_delete.Bind(EVT_BUTTON,self.OnDelete)
view.button_1_list.Bind(EVT_BUTTON,self.OnList)
def OnDelete(self, evt):
self.presenter.updateModel("delete")
def OnList(self, evt):
self.presenter.updateModel("list")
Probably you image that the boss of this program is updateModel function.
this function has this code:
def updateModel(self,Type):
iptType=Type
self.readGUI(iptType) # This function takes the request info from
GUI
packet=self.ipt_writeXML(iptType) # Put info in XML string
self.sender.send(packet) #Send the XML string
(xmlresponse,hostfrom)=self.receiver.receive() # Receive a XML
string response from agent and the IP of agent
self.iptResponse.run(xmlresponse,hostfrom) # view response in a
separate view.
Now it works great, but there is a big problem: my app wait for response
before allow user to do another request.
I thought that with threads it could works perfectly.
I tried to apply threads but without any good result.
Have you idea how can i do it and how can i apply thread to it?
Thanks all!
--
Sbaush
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060202/f25d3e53/attachment.html>
More information about the Python-list
mailing list