Problems using struct pack/unpack in files, and reading them.
Grant Edwards
invalid at invalid.invalid
Fri Nov 13 16:17:59 EST 2015
On 2015-11-13, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> Either retain the read data between calls, or call seek(0) before
> reading it again.
It has always saddened me that Python files don't have a rewind()
method. On Unix, calling rewind() is the same as calling seek(0), so
it's utterly pointless except as an amusing anachronistic name: it
always made me smile when called rewind() on a file in a filesystem on
a hard-drive. Interestingly, you can't you can't (and never could)
use rewind() to rewind a tape. You use an ioctl() system call for
that.
--
Grant Edwards grant.b.edwards Yow! HUGH BEAUMONT died
at in 1982!!
gmail.com
More information about the Python-list
mailing list