Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

24 Apr, 2024: Testing a new version of the Overboard here. If you have an issue post about it to rocksolid.nodes.help (I know. Everyone on Usenet has issues)


devel / comp.lang.python / Re: tail

SubjectAuthor
o Re: tailMarco Sulla

1
Re: tail

<mailman.360.1652118382.20749.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=18206&group=comp.lang.python#18206

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: Marco.Su...@gmail.com (Marco Sulla)
Newsgroups: comp.lang.python
Subject: Re: tail
Date: Mon, 9 May 2022 19:45:43 +0200
Lines: 15
Message-ID: <mailman.360.1652118382.20749.python-list@python.org>
References: <CABbU2U8u-arOsEO=JfRUPeNQS68TYWVUYHvp6StiNpp_xaotZQ@mail.gmail.com>
<YnijKH0NJdtDd2sa@cskk.homeip.net>
<CABbU2U8iThoCk9M0agJMqAFDq0A9hzY5kQUMW=Jm5C94NkP28Q@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de 80IAq/szHodGcOrwn8j5fAam8JEbaLq7ZolTDO2H+gaA==
Return-Path: <elbarbun@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=MLPuhMQe;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.013
X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; '2022': 0.05; 'absolute':
0.05; 'variable': 0.05; 'thing.': 0.07; 'anyway,': 0.09; 'byte':
0.09; 'arbitrary': 0.16; 'barry': 0.16; 'cameron': 0.16;
'characters.': 0.16; 'encoding': 0.16; 'from:name:marco sulla':
0.16; 'inspect': 0.16; 'mean.': 0.16; 'reliable,': 0.16;
'simpson': 0.16; 'stream.': 0.16; 'wrote:': 0.16; 'to:addr:python-
list': 0.20; 'cannot': 0.25; 'binary': 0.26; 'function': 0.27;
'do.': 0.32; 'message-id:@mail.gmail.com': 0.32; 'there': 0.33;
'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
'from:addr:gmail.com': 0.35; 'files': 0.36; 'mon,': 0.36; "it's":
0.37; 'received:209.85': 0.37; 'file': 0.38; 'way': 0.38;
'received:209': 0.39; 'text': 0.39; "there's": 0.61; 'mode': 0.62;
'here': 0.62; 'worked': 0.67; 'reliable': 0.74; 'mode,': 0.76;
'seek': 0.81; 'characters': 0.84; 'decent': 0.84; 'performance.':
0.84; 'received:209.85.167.177': 0.84; 'received:mail-
oi1-f177.google.com': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=N6ZwS/jo76imtloxNybrr2dY36yJZ6G4TE8lrnbh2lM=;
b=MLPuhMQeI1GnkaJ4KcP2neC2ZerrZsZzRHfB8bcOl0ixTvCnHdoiUKgtgCYK4wIZRI
2yg1vAolbpE9KddPKvfVA9G9rimgq9+ST82gLIL5MTwFfApxR2euLUpwU/Q5G/TRTjOH
ogxR2Yf7LQFdYzMp591yYlz4+TG3ZtdDsqorV+I7d1iX6kpXUx8tTuIplzxjyk4LUxs3
vOCqjLmFWzmp1p9IVPId3scO3juMGZgqeyuRUUveEGDpq7GSoea2kMKXDdd1HhYdObqy
kDZfIJxBeiHbkOi0rUgSZALAIHyC8afPNIK3qGkotjh7JI9LBnjs//eudOLjF7p5uP5Y
7Erg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=N6ZwS/jo76imtloxNybrr2dY36yJZ6G4TE8lrnbh2lM=;
b=fRblRbIUbtzZXFw04QBu3+x3fA/4ZhgtI5Zf/HXO6cL5ffYoM+K4kunHS2wsgysA/2
B2wdb5V0mLaM07Q72XdtUuI04HFXmXv7g1iQI6tkxKXxOfpOxxWaRoN1Z+tN2LMTwGvG
CBz08mZeurPGnT6VeC/HtjjqtlIpGVe0S4Wjp6Npta24VE0Hhv1LGybmjd2SXmG8d+tL
kn0TjuL8/U/TPdRnB/xcnQ4iwJBDjCTO5bifQkwny4X0uLzCNBx5bO0P8BTV5qrIEmKG
ihRNK20cL+tX67WDTeNkrCSfSQIRpCE/5+IqenN3iCzbpb8s+o+Hd+qIZiVuJHLXVsrJ
s46A==
X-Gm-Message-State: AOAM532Id7EzWdNyiQJxeh0JqDI0UhG0Lg1eky9klNZTQ9KZS6zkET6S
rOh44W0kx8+YKhRBZTkz/RS+hZwE7Kfjyfy22DX3gM8J
X-Google-Smtp-Source: ABdhPJyEUYB+qr+bNQA1ugpEQzY0pwiIyclRGLdVlzMQ8sUF5fvkHNo/P7KvZbnB5sHJsOGrBepSGmJSe4ZBje+cbG4=
X-Received: by 2002:a05:6808:148e:b0:326:abe8:af49 with SMTP id
e14-20020a056808148e00b00326abe8af49mr5688437oiw.73.1652118379676; Mon, 09
May 2022 10:46:19 -0700 (PDT)
In-Reply-To: <YnijKH0NJdtDd2sa@cskk.homeip.net>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://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: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CABbU2U8iThoCk9M0agJMqAFDq0A9hzY5kQUMW=Jm5C94NkP28Q@mail.gmail.com>
X-Mailman-Original-References: <CABbU2U8u-arOsEO=JfRUPeNQS68TYWVUYHvp6StiNpp_xaotZQ@mail.gmail.com>
<YnijKH0NJdtDd2sa@cskk.homeip.net>
 by: Marco Sulla - Mon, 9 May 2022 17:45 UTC

On Mon, 9 May 2022 at 07:56, Cameron Simpson <cs@cskk.id.au> wrote:
>
> The point here is that text is a very different thing. Because you
> cannot seek to an absolute number of characters in an encoding with
> variable sized characters. _If_ you did a seek to an arbitrary number
> you can end up in the middle of some character. And there are encodings
> where you cannot inspect the data to find a character boundary in the
> byte stream.

Ooook, now I understand what you and Barry mean. I suppose there's no
reliable way to tail a big file opened in text mode with a decent performance.

Anyway, the previous-previous function I posted worked only for files
opened in binary mode, and I suppose it's reliable, since it searches
only for b"\n", as readline() in binary mode do.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor