Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #30337

Re: Reducing cache/buffer for faster display

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'output': 0.04; 'puts': 0.07; 'trailing': 0.07; 'python': 0.09; 'cursor': 0.09; 'mess': 0.09; 'messing': 0.09; 'overwrite': 0.09; 'sep': 0.09; 'carriage': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'incomplete': 0.16; 'ugly.': 0.16; 'wrote:': 0.17; 'fine,': 0.22; 'errors': 0.23; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'subject:/': 0.28; '(unless': 0.29; 'case,': 0.29; 'fri,': 0.30; '(and': 0.32; 'to:addr:python- list': 0.33; 'received:google.com': 0.34; 'done': 0.34; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'display': 0.36; 'does': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'john': 0.60; 'back': 0.62; 'delay.': 0.84; 'ripe': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=i5uz4Sw5ZiwvbNtWGXC+6xmdffxw55so6VbWEKSwQMI=; b=cxyS4aCK4v83fW6AwU9U5Xgw+1jYucKWs7jy/2NFk5MSoJObzfNt+b4r6gfoqt3ijN v9sAWleYAPy8Jwe7hl9e7yPVnUUW/nrb20g9TCc15DuUEMuCrByPB3hsUZ13D6sZhx2G 8aIrDIJdvYhdRNcLD3IZ7YRrS7hDnzSir3YYSswESXU+wMUcWQP0eH9doOQnMB2GJvw8 uK7OGdefBV3y+K5PD9VZ4KZP9j68pRD9XyBYZ6fcimDGOGM2sfbsPyusXYn8QUbeFLgv Wkjr1kbgs57MyjPLJbwEHGbDHVXLGsQUArgtwhQJjUe+rbx6XKwL/DJbImElenoLBJg8 Of3g==
MIME-Version 1.0
In-Reply-To <k42jp3$1nc$1@reader1.panix.com>
References <cmuej9-0ml.ln1@murmur.very.softly> <mailman.1522.1348783807.27098.python-list@python.org> <k42jp3$1nc$1@reader1.panix.com>
Date Fri, 28 Sep 2012 08:38:29 +1000
Subject Re: Reducing cache/buffer for faster display
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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.1523.1348785513.27098.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1348785513 news.xs4all.nl 6928 [2001:888:2000:d::a6]:35918
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:30337

Show key headers only | View raw


On Fri, Sep 28, 2012 at 8:25 AM, John Gordon <gordon@panix.com> wrote:
> Isn't terminal output line-buffered?  I don't understand why there would
> be an output delay.  (Unless the "\r" is messing things up...)

This is a classic progress-indication case, which does indeed mess up
line-buffering. The carriage return (and no line feed, done in the
Python 2 style of a trailing comma) puts the cursor back to the
beginning of the line, ready to overwrite, and ripe for one of those
old favorite incomplete overwrite errors - if nFiles monotonically
increases, it's fine, but if it decreases, the display can get ugly.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Reducing cache/buffer for faster display Rikishi42 <skunkworks@rikishi42.net> - 2012-09-27 23:57 +0200
  Re: Reducing cache/buffer for faster display Chris Angelico <rosuav@gmail.com> - 2012-09-28 08:09 +1000
    Re: Reducing cache/buffer for faster display John Gordon <gordon@panix.com> - 2012-09-27 22:25 +0000
      Re: Reducing cache/buffer for faster display Chris Angelico <rosuav@gmail.com> - 2012-09-28 08:38 +1000
        Re: Reducing cache/buffer for faster display Rikishi42 <skunkworks@rikishi42.net> - 2012-09-28 02:05 +0200
          Re: Reducing cache/buffer for faster display Chris Angelico <rosuav@gmail.com> - 2012-09-28 18:08 +1000
            Re: Reducing cache/buffer for faster display Rikishi42 <skunkworks@rikishi42.net> - 2012-09-29 02:31 +0200
      Re: Reducing cache/buffer for faster display Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-27 21:46 -0400
        Re: Reducing cache/buffer for faster display Rikishi42 <skunkworks@rikishi42.net> - 2012-09-29 02:20 +0200
          Re: Reducing cache/buffer for faster display Hans Mulder <hansmu@xs4all.nl> - 2012-09-29 14:32 +0200
          Re: Reducing cache/buffer for faster display Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-29 14:12 -0400
    Re: Reducing cache/buffer for faster display Rikishi42 <skunkworks@rikishi42.net> - 2012-09-28 02:15 +0200

csiph-web