Re: tail

2022-05-09 Thread Alan Bawden
Marco Sulla writes: On Mon, 9 May 2022 at 19:53, Chris Angelico wrote: ... Nevertheless, tail is a fundamental tool in *nix. It's fast and reliable. Also the tail command can't handle different encodings? It definitely can't. It works for UTF-8, and all the ASCII compatible single

Re: tail

2022-05-09 Thread Dennis Lee Bieber
On Mon, 9 May 2022 21:11:23 +0200, Marco Sulla declaimed the following: >Nevertheless, tail is a fundamental tool in *nix. It's fast and >reliable. Also the tail command can't handle different encodings? Based upon https://github.com/coreutils/coreutils/blob/master/src/tail.c the ONLY

Re: tail

2022-05-09 Thread Chris Angelico
On Tue, 10 May 2022 at 07:07, Barry wrote: > POSIX tail just prints the bytes to the output that it finds between \n bytes. > At no time does it need to care about encodings as that is a problem solved > by the terminal software. I would not expect utf-16 to work with tail on > linux systems.

Re: tail

2022-05-09 Thread Barry
> On 9 May 2022, at 20:14, Marco Sulla wrote: > > On Mon, 9 May 2022 at 19:53, Chris Angelico wrote: >> >>> On Tue, 10 May 2022 at 03:47, Marco Sulla >>> wrote: >>> >>> On Mon, 9 May 2022 at 07:56, Cameron Simpson wrote: The point here is that text is a very different thing.

Re: tail

2022-05-09 Thread Barry
> On 9 May 2022, at 17:41, r...@zedat.fu-berlin.de wrote: > > Barry Scott writes: >> Why use tiny chunks? You can read 4KiB as fast as 100 bytes > > When optimizing code, it helps to be aware of the orders of > magnitude That is true and we’ll know to me, now show how what I said is

Re: tail

2022-05-09 Thread Chris Angelico
On Tue, 10 May 2022 at 05:12, Marco Sulla wrote: > > On Mon, 9 May 2022 at 19:53, Chris Angelico wrote: > > > > On Tue, 10 May 2022 at 03:47, Marco Sulla > > wrote: > > > > > > On Mon, 9 May 2022 at 07:56, Cameron Simpson wrote: > > > > > > > > The point here is that text is a very different

Re: tail

2022-05-09 Thread Marco Sulla
On Mon, 9 May 2022 at 19:53, Chris Angelico wrote: > > On Tue, 10 May 2022 at 03:47, Marco Sulla > wrote: > > > > On Mon, 9 May 2022 at 07:56, Cameron Simpson wrote: > > > > > > The point here is that text is a very different thing. Because you > > > cannot seek to an absolute number of

Re: usb tv stick and python

2022-05-09 Thread Dennis Lee Bieber
On Mon, 9 May 2022 17:56:32 +0200, jak declaimed the following: >First of all, thank you for your reply. Actually I already have a handy >work around to use w_scan because I have a VM with linux (ubuntu) >installed. I was just looking for a python package/library that would >allow me to write a

Re: tail

2022-05-09 Thread 2QdxY4RzWzUUiLuE
On 2022-05-08 at 18:52:42 +, Stefan Ram wrote: > Remember how recently people here talked about how you cannot copy > text from a video? Then, how did I do it? Turns out, for my > operating system, there's a screen OCR program! So I did this OCR > and then manually corrected a few

Re: tail

2022-05-09 Thread Chris Angelico
On Tue, 10 May 2022 at 03:47, Marco Sulla wrote: > > On Mon, 9 May 2022 at 07:56, Cameron Simpson 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

Re: tail

2022-05-09 Thread Marco Sulla
On Mon, 9 May 2022 at 07:56, Cameron Simpson 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

Re: usb tv stick and python

2022-05-09 Thread jak
Il 09/05/2022 16:28, Dennis Lee Bieber ha scritto: On Mon, 9 May 2022 08:47:50 +0200, jak declaimed the following: Hello everybody, I usually use vlc to watch tv and I use the w_scan program on linux to create a file (.m3u) with the list of available channels. Unfortunately I can't find an

Re: usb tv stick and python

2022-05-09 Thread Dennis Lee Bieber
On Mon, 9 May 2022 08:47:50 +0200, jak declaimed the following: >Hello everybody, >I usually use vlc to watch tv and I use the w_scan program on linux to >create a file (.m3u) with the list of available channels. Unfortunately >I can't find an alternative to w_scan for Windows and I was

Re: tail

2022-05-09 Thread Dennis Lee Bieber
On Sun, 8 May 2022 22:48:32 +0200, Marco Sulla declaimed the following: > >Emh. I re-quote > >seek(offset, whence=SEEK_SET) >Change the stream position to the given byte offset. > >And so on. No mention of differences between text and binary mode. You ignore that, underneath, Python is

usb tv stick and python

2022-05-09 Thread jak
Hello everybody, I usually use vlc to watch tv and I use the w_scan program on linux to create a file (.m3u) with the list of available channels. Unfortunately I can't find an alternative to w_scan for Windows and I was wondering if you could tell me some python library that allows me, easily, to

Re: tail

2022-05-09 Thread Greg Ewing
On 9/05/22 7:47 am, Marco Sulla wrote: It will fail if the contents is not ASCII. Why? For some encodings, if you seek to an arbitrary byte position and then read, it may *appear* to succeed but give you complete gibberish. Your method might work for a certain subset of encodings (those