fdopen() question

Skip Montanaro skip at pobox.com
Tue Apr 8 18:27:44 CEST 2003

    Carsten> Traceback (most recent call last):
    Carsten>   File "./listener.py", line 27, in ?
    Carsten>     f = os.fdopen(fd, 'r')
    Carsten> OSError: [Errno 9] Bad file descriptor

    Carsten> What am I missing?

If you print fd, is it a small integer?  Is there some place in the code
where os.close(fd) might have been called before you got ahold of fd?


More information about the Python-list mailing list