read/write to java socket in python

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at
Tue Nov 27 20:33:23 CET 2007

madsornomads at wrote:
> I have a problem with reading from a Java server after I have
> written to it - it just hangs. It works fine if I just write to
> the server and not try to write. 

Excuse me?

> I have read the HOWTO on sockets - and it states that there is a
> problem (something about flushing), but not what the solutions is.
> Nor do google. Can somebody please help?

Spare yourself the trouble and do not use low level socket functions
in Python directly. Try Twisted.

As for that Java problem I recommend learning common debugging
techniques: Use a protocol analyser ( and let
your program(s) output a debug log.



BOFH excuse #16:

somebody was calculating pi on the server

More information about the Python-list mailing list