If I have some file-like object and do the following:
F = open('abc', 'r')
...
loc = F.tell()
F.seek(loc-10)
What does seek do? Does is start at the beginning of the file and read loc-10
bytes? Or is it smart enough just to back up 10 bytes?
It is OS- and libc-specific. the file.seek()
operation is delegated to the fseek(3)
C call for actual OS-level files.