file.readlines() and IOError exceptions

Fredrik Lundh fredrik at pythonware.com
Wed Jul 12 03:19:52 EDT 2006


Astan Chee wrote:

> now the file Im trying to read has recently had alot of read/writes from 
> other users/threads/etc, so every now and again I get a
> IOError: [Errno 9] Bad file descriptor

> I know this has something to do with not being able to read while some 
> filehandles are open (or is it?)..

EBADF usually means that you're trying to read from a file that's no 
longer open.  other users shouldn't be able to cause that error; I'd 
suspect sloppy thread programming...

</F>




More information about the Python-list mailing list