Yangyouxiu, I can definitely help you with this as I've recently written a chat server/client with twisted+PyQt4 and am working on a more complex program that uses PyQt4 with twisted's perspective broker.
I have attached five files: 1. client-pyqtreactor.py is a chat client using pyqtreactor and PyQt4. 2. ui.ui is the user interface file loaded by client-pyqtreactor.py 3. server.py is a chat server using asyncore. Note that the server need not use PyQt4 as it has no GUI. 4. constants.py contains configuration data for the client and server 5. qt4reactor.py is the custom reactor Put these all in the same directory, then run the server, then run some clients. When the client window appears click "connect" and then you can use it just like any other network chat program. I hope this helps, and if anyone has suggestions on how to improve the client code please tell me, as I intend on using it as part of a tutorial on twsited+PyQt4. Danie Sank
client-pyqtreactor.py
Description: application/binary
constants.py
Description: application/binary
qt4reactor.py
Description: application/binary
server.py
Description: application/binary
ui.ui
Description: Binary data
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python