socket troubles
Gordon McMillan
gmcm at hypernet.com
Mon Feb 14 10:46:30 EST 2000
Sean Conley wrote:
> This problem has me completely stumped. I am trying to write a telnet
> client (actually a mud client) in Python. The problem is that I can
> connect and read information from the socket, but nothing seems to
> happen when I send to the socket.
How do you know that? Does your app freeze? (that would
indicate the socket isn't writable). Nothing happens? (most
likely the server is waiting for more - how does the server know
when you're done sending?) Do you get an exception?
You're not checking how bytes were actually sent. I have no
idea what createfilehandler does with the socket, although I'd
guess that's not the problem.
There's a sockets HOWTO on python.org you should probably
check out.
> I believe it may be a problem with my
> program, as I had the same problem with Perl/Tk and was unable to solve
> it there either. So, if anyone has ANY idea why this could be please
> email me or post here.
My first guess is that you haven't delimited the sent data
properly, and the server is waiting for more.
- Gordon
More information about the Python-list
mailing list