Sockets in Python

guijarro guijarro at wanadoo.fr
Thu Mar 22 12:29:21 EST 2001


Hello guys,

here is my problem : I'd like to create a simple network card game with
Python,
but I've got some troubles with the sockets...

In fact I'd like to find some kind of tutorial about this subject, because
although
my first-time code quite works, I don't think it is really good.

When I try all the samples I've found on the 'net about sockets, the "main"
loop for communicating, generally implemented with a While 1: ..., makes my
computer frozen up (under Windows, not under Linux).
That's why I thought it would be better to use threads, for the listening
function
for example, but it doesn't work well under Windows (sometimes it hangs up,
I can't figure out why !).

I'm sure it's possible creating a robust and nice app which uses the
sockets encapsulation provided with Python under Windows, but how ?
What are the "good" things to do ?
What is the best module to use between socket or asyncore ?

Well, if someone can help me with the sockets in general and the sockets
with Python, it would be greatly appreciated...
(I've already read the "classic" tutorials about sockets, I followed the
links
on the Python website, etc..)

Thanks in advance.










More information about the Python-list mailing list