recently I was trying some IPC using sockets on my phone (6600). I wrote two scripts (server and client) and run one from my Ped and the other one from the standard Python Shell.
The server was using port 39871 (arbitrary one) on host 127.0.0.1 (localhost).
It worked quite well until I've tried the select module.
It seems that you cannot use select for waiting for incoming connections. So if your socket is a listening one and you're calling select() because you don't know if accept() will block (you do it by passing timeout=0 to the select), you can't do that. I haven't found anything about this limitation in PyS60 docs.
Here's a part of the server code:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
lst = select.select([sock], , )
Oddly, when it gets to the select line, it dumps
to the stdout or stderr (although I haven't print anything).
error socket.error (0, 'Error')
Then it continues the execution.
After the socket has been connected/accepted, select works as expected.
Should I file a bug report?