Re: Closing socket file descriptors

2007-05-20 Thread js
Hi Yang. > Hi, thanks for your answer. Should I just use that object's close() > method? Is it safe to assume that objects that have fileno() also have > close()? (Statically typed interfaces would come in handy now.) > I'm writing a simple asynchronous I/O framework (for learning purposes - > I'm

Re: Closing socket file descriptors

2007-05-20 Thread Yang
Hi, thanks for your answer. Should I just use that object's close() method? Is it safe to assume that objects that have fileno() also have close()? (Statically typed interfaces would come in handy now.) I'm writing a simple asynchronous I/O framework (for learning purposes - I'm aware of the my

Re: Closing socket file descriptors

2007-05-20 Thread js
Hello, Yang. You're not supposed to use os.open there. See the doc at http://docs.python.org/lib/os-fd-ops.html Is there any reason you want to use os.close? On 20 May 2007 04:26:12 GMT, Yang <[EMAIL PROTECTED]> wrote: > Hi, I'm experiencing a problem when trying to close the file descriptor > f

Closing socket file descriptors

2007-05-19 Thread Yang
Hi, I'm experiencing a problem when trying to close the file descriptor for a socket, creating another socket, and then closing the file descriptor for that second socket. I can't tell if my issue is about Python or POSIX. In the following, the first time through, everything works. On the sec