Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #98770
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Problems using struct pack/unpack in files, and reading them. |
| Date | 2015-11-13 21:17 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <n25k27$m37$1@reader1.panix.com> (permalink) |
| References | <20151113192045.GA9913@z-sverige.nu> <CALwzidnL1N8efgJfM-EKTgqzmDjg2QwcZVVmDXJB2_QGyFnExA@mail.gmail.com> <20151113201510.GA10107@z-sverige.nu> <mailman.306.1447448484.16136.python-list@python.org> |
On 2015-11-13, Ian Kelly <ian.g.kelly@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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Problems using struct pack/unpack in files, and reading them. Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-13 14:00 -0700
Re: Problems using struct pack/unpack in files, and reading them. Grant Edwards <invalid@invalid.invalid> - 2015-11-13 21:17 +0000
Re: Problems using struct pack/unpack in files, and reading them. kent nyberg <kent@z-sverige.nu> - 2015-11-13 16:34 -0500
Re: Problems using struct pack/unpack in files, and reading them. Grant Edwards <invalid@invalid.invalid> - 2015-11-13 21:44 +0000
csiph-web