Project 5: A Virtual Tea Party
Magnus Lie Hetland · Apress eBooks · 2008
I n this project, you do some serious network programming. You’ll write a chat server—a program that lets several people connect via the Internet and chat with each other in real time. There are many ways to create such a beast in Python. A simple and natural approach might be to use the Twisted framework (discussed in Chapter 14), for example, with the LineReceiver class taking center stage. In this chapter, I stick to the standard libraries, basing the program on the modules asyncore and asynchat. If you like, you could try out some of the alternative methods (such as forking or threading) discussed in Chapter 14. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.