2015-03-24 2:44 GMT+01:00 Guido van Rossum <[email protected]>:
> For seekable() I couldn't find any dynamic implemetations,
The first call to io.FileIO.seekable() calls lseek(0, SEEK_CUR).
It's safer to expect that any file method can block on I/O.
If you doubt that syscalls can block, try unbuffered FileIO on a NFS
share with metadata cache disabled ("mount -o noac" on Linux). Unplug
the network cable and enjoy :-)
I checked yesterday with fstat(): the syscall blocks until the network
cable is plugged again. At least on Linux, it's not possible to
interrupt fstat() with a signal like CTRL+c :-(
Victor