jid=xmpp.protocol.JID(GMAIL_ID)
cl=xmpp.Client(jid.getDomain(),debug=[])
if not cl.connect((GTALK_SERVER,5222)):
raise IOError('Can not connect to server.')
if not cl.auth(jid.getNode(),GMAIL_PASS):
raise IOError('Can not auth with server.')
cl.RegisterHandler('message',messageHandler)
cl.sendInitPresence()
print "Google Talk Client started."
loop(cl)
And Im trying to integrate it with wx.App so that I can control my GUI as well as this loop with wx. How do I do this? I know I have to create a class inherited from wx.App with special methods (overwriting the old one), which ones are they?
Or are there examples of how to do this?
Thanks for any help!
Astan
jid=xmpp.protocol.JID(GMAIL_ID)
cl=xmpp.Client(jid.getDomain(),debug=)
if not cl.connect((GTALK_SERVER,5222)):
raise IOError('Can not connect to server.')
if not cl.auth(jid.getNode(),GMAIL_PASS):
raise IOError('Can not auth with server.')
cl.RegisterHandler('message',messageHandler)
cl.sendInitPresence()
print "Google Talk Client started."
loop(cl)
And Im trying to integrate it with wx.App so that I can control my GUI as well as this loop with wx. How do I do this? I know I have to create a class inherited from wx.App with special methods (overwriting the old one), which ones are they?
Or are there examples of how to do this?
There is an example in samples/mainloop, but I would first try things like decomposing your other loop such that it can be run in chunks from a wx.EVT_TIMER or similar. You'll probably also want to take a look at LongRunningTasks - wxPyWiki
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!