Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30105
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'position,': 0.04; 'method.': 0.05; 'parameter': 0.07; 'subject:file': 0.07; 'method:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sep': 0.09; "wouldn't": 0.11; 'subject:python': 0.11; 'benjamin': 0.16; 'eckhardt': 0.16; 'naive': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:API': 0.16; 'tape': 0.16; 'wrote:': 0.17; 'driver': 0.17; 'followed': 0.20; 'bit': 0.21; 'delta': 0.22; 'absolute': 0.23; 'specified': 0.23; 'random': 0.24; 'second': 0.24; 'am,': 0.27; "doesn't": 0.28; 'header:X-Complaints-To:1': 0.28; '+0100,': 0.29; 'optional': 0.29; 'trigger': 0.29; 'probably': 0.29; "i'm": 0.29; 'mode': 0.30; 'position.': 0.30; 'relative': 0.30; 'code': 0.31; 'file': 0.32; 'could': 0.32; '+0200,': 0.33; 'url:home': 0.33; 'handle': 0.33; 'to:addr:python-list': 0.33; 'done': 0.34; 'third': 0.34; 'faster': 0.35; 'received:org': 0.36; 'really': 0.36; 'but': 0.36; 'charset:us-ascii': 0.36; 'passed': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'google': 0.39; 'where': 0.40; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'effective': 0.63; 'information': 0.63; 'more': 0.63; 'making': 0.64; 'drive,': 0.65; 'difference.': 0.84; 'improvement': 0.84; 'oscar': 0.84; 'dennis': 0.91; 'received:108': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
| Subject | Re: python file API |
| Date | Tue, 25 Sep 2012 12:07:16 -0400 |
| Organization | > Bestiaria Support Staff < |
| References | <0ec1fe2e-890c-4e25-8047-4cb8bee0aa95@googlegroups.com> <mailman.1217.1348523382.27098.python-list@python.org> <d5v7j9-qnr.ln1@satorlaser.homedns.org> <60q268tnj9mqhvdtlehv59ob9bvpf8lgjr@invalid.netcom.com> <CAHVvXxT2YU2rUPRJNaOa3N4z3MAQkxJPQ5oMf01bvn6+7E8PXQ@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | adsl-108-68-179-103.dsl.klmzmi.sbcglobal.net |
| X-Newsreader | Forte Agent 3.3/32.846 |
| X-No-Archive | YES |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1350.1348589234.27098.python-list@python.org> (permalink) |
| Lines | 54 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1348589234 news.xs4all.nl 6912 [2001:888:2000:d::a6]:59505 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:30105 |
Show key headers only | View raw
On Tue, 25 Sep 2012 10:58:25 +0100, Oscar Benjamin
<oscar.j.benjamin@gmail.com> declaimed the following in
gmane.comp.python.general:
> On Sep 25, 2012 9:28 AM, "Dennis Lee Bieber" <wlfraed@ix.netcom.com> wrote:
> >
> > On Tue, 25 Sep 2012 08:22:05 +0200, Ulrich Eckhardt
> > <ulrich.eckhardt@dominolaser.com> declaimed the following in
> > gmane.comp.python.general:
> >
> > > Am 24.09.2012 23:49, schrieb Dave Angel:
> > > > And what approach would you use for positioning relative to
> > > > end-of-file? That's currently done with an optional second
> > > > parameter to seek() method.
> > >
> > > Negative indices.
> > >
> >
> > Which still doesn't handle the third seek mode -- relative to
> > current position.
>
> f.pos += delta
>
> That's the only part of the proposal that I really think is an improvement
> over the current method:
>
> f.seek(delta, 1)
>
> I actually had to google the whence code for relative seeking which I
> wouldn't need to do if it were more descriptive.
>
> But then I never do relative seeking. I'm pretty sure my programs have
> always either read the whole file in order with no seeking or used random
> access with absolute seeking.
>
Okay, I was a bit blind this morning...
And with the effective demise of tape-drives there's probably not
much difference. I could visualize where the seek mode was part of the
information passed down to a tape drive, making a "seek.current" much
faster than a "seek.set".
f.pos += delta
would be a "seek.set" and with a naive driver might trigger a rewind to
the start of the tape followed by a seek to the absolute position,
whereas the seek from current location would only move the tape by the
specified amount...
> Oscar
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
python file API zipher <dreamingforward@gmail.com> - 2012-09-24 14:35 -0700
Re: python file API Dave Angel <d@davea.name> - 2012-09-24 17:49 -0400
Re: python file API Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-09-25 08:22 +0200
Re: python file API Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-25 04:19 -0400
Re: python file API Grant Edwards <invalid@invalid.invalid> - 2012-09-25 14:07 +0000
Re: python file API Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-25 12:07 -0400
Re: python file API Chris Angelico <rosuav@gmail.com> - 2012-09-26 02:12 +1000
Re: python file API Chris Kaynor <ckaynor@zindagigames.com> - 2012-09-24 14:58 -0700
Re: python file API Chris Angelico <rosuav@gmail.com> - 2012-09-25 08:14 +1000
Re: python file API zipher <dreamingforward@gmail.com> - 2012-09-24 15:36 -0700
Re: python file API Mark Adam <dreamingforward@gmail.com> - 2012-09-24 21:32 -0500
Re: python file API Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-25 08:27 +0100
Re: python file API Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-25 11:51 +0100
Re: python file API zipher <dreamingforward@gmail.com> - 2012-09-24 15:36 -0700
Re: python file API Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-25 02:28 +0000
Re: python file API Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-09-25 07:25 +0200
Re: python file API Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-25 07:28 +0000
Re: python file API Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-09-25 21:40 +0200
Re: python file API Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-25 01:33 +0000
Re: python file API Dave Angel <d@davea.name> - 2012-09-24 18:36 -0400
Re: python file API Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-24 16:37 -0600
Re: python file API Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-09-25 07:32 +0200
Re: python file API Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-25 04:13 -0400
Re: python file API Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-09-25 11:53 +0200
Re: python file API Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-25 03:32 -0600
Re: python file API Chris Angelico <rosuav@gmail.com> - 2012-09-25 08:57 +1000
Re: python file API Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-25 00:12 +0100
Re: python file API Chris Kaynor <ckaynor@zindagigames.com> - 2012-09-24 16:14 -0700
Re: python file API Ramchandra Apte <maniandram01@gmail.com> - 2012-09-30 05:50 -0700
csiph-web