Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Loris Bennett via Python-list
Chris Angelico writes: > On Tue, 12 Nov 2024 at 01:59, Loris Bennett via Python-list > wrote: >> 2. In terms of generating a helpful error message, how should one >>distinguish between the config file not existing and the log file not >>existing? > >

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Karsten Hilbert via Python-list
Am Tue, Nov 12, 2024 at 09:52:31AM +0100 schrieb Loris Bennett via Python-list: > Regarding your example above, if 'missingfile.py' contains the following > > import configparser > > config = configparser.ConfigParser() > > try: > config.read('

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Chris Angelico via Python-list
On Wed, 13 Nov 2024 at 07:29, Mats Wichmann via Python-list wrote: > > On 11/12/24 12:10, Left Right via Python-list wrote: > > > Finally, if you want your logs to go to a file, and currently, your > > only option is stderr, your shell gives you a really, really simple &

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Greg Ewing via Python-list
eason it has to lose data. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-13 Thread Roel Schroeven via Python-list
Op 12/11/2024 om 20:10 schreef Left Right via Python-list: > I am not entirely convinced by NB2. I am, in fact, a sort of sysadmin > person and most of my programs write to a log file. The programs are > also moderately complex, so a single program might access a database, > q

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Mats Wichmann via Python-list
On 11/12/24 12:10, Left Right via Python-list wrote: Finally, if you want your logs to go to a file, and currently, your only option is stderr, your shell gives you a really, really simple way of redirecting stderr to a file. So, really, there aren't any excuses to do that. an awful l

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Loris Bennett via Python-list
y' contains the following import configparser config = configparser.ConfigParser() try: config.read('/foo/bar') except FileNotFoundError as e: print(f"Error: configuration file {config_file} not found: {e}") them python3 missingfile.py does not produce an any output for me and so does not seem to be a reliable way of handling the case where the config file does not exist. Cheers, Loris -- This signature is currently under constuction. -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Loris Bennett via Python-list
Chris Angelico writes: > On Tue, 12 Nov 2024 at 01:59, Loris Bennett via Python-list > wrote: >> 2. In terms of generating a helpful error message, how should one >>distinguish between the config file not existing and the log file not >>existing? > >

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Loris Bennett via Python-list
to stderr? Quite apart from that, I find having a log file a useful for debugging when I am developing. Cheers, Loris > On Mon, Nov 11, 2024 at 4:00 PM Loris Bennett via Python-list > wrote: >> >> Hi, >> >> I have the following in my program: >>

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Left Right via Python-list
your logs to go to a file, and currently, your only option is stderr, your shell gives you a really, really simple way of redirecting stderr to a file. So, really, there aren't any excuses to do that. -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-13 Thread Dieter Maurer via Python-list
l.python.org/mailman/listinfo/python-list

Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read

2024-10-31 Thread Jon Ribbens via Python-list
t, or an HTTP request, or from a database. It is good practice in general to provide a method that allows your class to read data as a stream, if that is appropriate for what you're doing, so that people aren't unnecessarily forced to load data fully into memory or write it to a file, as well as perhaps a convenience method thaat will read from a named file for people who are doing that. -- https://mail.python.org/mailman/listinfo/python-list

ANN: PyDDF Python Herbst Sprint 2024

2024-10-31 Thread eGenix Team via Python-list
. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ -- https://mail.python.org/mailman/listinfo/python-list

Printing UTF-8 mail to terminal

2024-10-31 Thread Loris Bennett via Python-list
-- This signature is currently under constuction. -- https://mail.python.org/mailman/listinfo/python-list

Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read

2024-10-31 Thread Karsten Hilbert via Python-list
Am Thu, Oct 31, 2024 at 07:47:17AM +0100 schrieb Loris Bennett via Python-list: > However I didn't make myself clear: I understand that there are > different functions, depending on whether I have a file name or a > stream. Nevertheless, I just can't think of a practical exam

Poetry: endpoints with endpoints

2024-10-31 Thread Loris Bennett via Python-list
dd such endpoint? If so, how? Cheers, Loris -- This signature is currently under constuction. -- https://mail.python.org/mailman/listinfo/python-list

Re: Using 'with open(...) as ...' together with configparser.ConfigParser.read

2024-10-31 Thread Loris Bennett via Python-list
functions, depending on whether I have a file name or a stream. Nevertheless, I just can't think of a practical example where I might just have *only* a stream, especially one containing my configuration data. I was just interested to know if anyone can give an example. -- This signature is currently under constuction. -- https://mail.python.org/mailman/listinfo/python-list

Re: Printing UTF-8 mail to terminal

2024-10-31 Thread Cameron Simpson via Python-list
n.org/3/library/quopri.html Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Printing UTF-8 mail to terminal

2024-10-31 Thread Alan Gauld via Python-list
On 31/10/2024 20:50, Cameron Simpson via Python-list wrote: > That looks to me like quoted-printable. This is an encoding for binary > transport of text to make it robust against not 8-buit clean ... > If you're just dealing with this directly, use the `quopri` stdlib &

Correct module for site customization of path

2024-10-31 Thread Tim Johnson via Python-list
boatload of documentation of site path configuration, but still, I am not sure what option to take. Recommendations are invited and welcome. Thanks -- Tim thjmm...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-12 Thread Dieter Maurer via Python-list
pt` clause with a `raise`), you >>will learn where in the code the exception has been raised >>and likely as well what was not found (Python is quite good >>with such error details). > >Actually, file-not-found is pretty well defined - the except action >itself is fine in that regard. The original exception likely tells us which file was not found. -- https://mail.python.org/mailman/listinfo/python-list

Python 3.8 or later on Debian?

2024-09-18 Thread Ulrich Goebel via Python-list
? I'm not a friend of things so deep in the system... Greetings Ulrich -- Ulrich Goebel -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.8 or later on Debian?

2024-09-18 Thread Alexander Neilson via Python-list
the past I did build newer Python versions (mostly on raspberry pi’s) Regards Alexander Alexander Neilson Neilson Productions Limited 021 329 681 alexan...@neilson.net.nz > On 19 Sep 2024, at 10:42, Ulrich Goebel via Python-list > wrote: > > Hi, > > Debian Linux seems

Re: Common objects for CLI commands with Typer

2024-09-23 Thread Barry Scott via Python-list
> On 21 Sep 2024, at 11:40, Dan Sommers via Python-list > wrote: > > Despite the fact that "everything is an object" in Python, you don't > have to put data or functions inside classes or objects. I also know > nothing about Typer, but there's noth

Re: Common objects for CLI commands with Typer

2024-09-21 Thread Dan Sommers via Python-list
On 2024-09-21 at 06:38:05 +0100, Barry via Python-list wrote: > > On 20 Sep 2024, at 21:01, Loris Bennett via Python-list > > wrote: > > > > Hi, > > > > Apologies if the following description is to brief - I can expand if no > > one knows what I&#x

Re: Common objects for CLI commands with Typer

2024-09-23 Thread Dan Sommers via Python-list
On 2024-09-23 at 19:00:10 +0100, Barry Scott wrote: > > On 21 Sep 2024, at 11:40, Dan Sommers via Python-list > > wrote: > But once your code gets big the disciple of using classes helps > maintenance. Code with lots of globals is problematic. Even before your code gets big

Re: [Tutor] How to stop a specific thread in Python 2.7?

2024-09-25 Thread marc nicole via Python-list
ion and keep it to hand for your use outside the thread. > ___ > Tutor maillist - tu...@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > -- https://mail.python.org/mailman/listinfo/python-list

Re: How to stop a specific thread in Python 2.7?

2024-09-25 Thread Cameron Simpson via Python-list
if it becomes set. You just need a per-thred vent instead of a single Event for all the threads. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: How to stop a specific thread in Python 2.7?

2024-09-25 Thread marc nicole via Python-list
How to create a per-thread event in Python 2.7? On Wed, 25 Sept 2024, 22:47 Cameron Simpson via Python-list, < python-list@python.org> wrote: > On 25Sep2024 19:24, marc nicole wrote: > >I want to know how to kill a specific running thread (say by its id) > > > >for

Re: Beazley's Problem

2024-09-24 Thread Annada Behera via Python-list
omputation graph which takes space but is faster. For function: f:R^m->R, they can run in O(m^0)=O(1) time and vice versa ( O(m) time for f:R->R^m ). Almost all neural network training these days use reverse-mode autodiff. -- https://mail.python.org/mailman/listinfo/python-list

Re: Beazley's Problem

2024-09-23 Thread Annada Behera via Python-list
ou bust out those "next-level math tricks" >   with just a single line each! You might like: https://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf The numerics stuff starts on page 9. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to stop a specific thread in Python 2.7?

2024-09-25 Thread Cameron Simpson via Python-list
On 25Sep2024 22:56, marc nicole wrote: How to create a per-thread event in Python 2.7? Every time you make a Thread, make an Event. Pass it to the thread worker function and keep it to hand for your use outside the thread. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to stop a specific thread in Python 2.7?

2024-09-26 Thread Left Right via Python-list
just the design of threads. On Wed, Sep 25, 2024 at 7:26 PM marc nicole via Python-list wrote: > > Hello guys, > > I want to know how to kill a specific running thread (say by its id) > > for now I run and kill a thread like the following: > # start thread > thread1 = threading

Re: Trouble with mocking

2024-09-20 Thread Mark Bourne via Python-list
n2_to_mock` won't call `function1_to_mock` (or its mock) regardless of whether `function1_to_mock` has been patched, unless you set the mock of `function2_to_mock` to do so. You don't necessarily need to patch `function1_to_mock`, unless of course there are other calls to it that you need to mock. -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in 3.12.5

2024-09-20 Thread Cameron Simpson via Python-list
On 20Sep2024 12:52, Martin Nilsson wrote: The attached program doesn’t work in 3.12.5, but in 3.9 it worked. This mailing list discards attachments. Please include your code inline in the message text. Thanks, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

ANN: A new version (0.5.3) of python-gnupg has been released.

2024-09-20 Thread Vinay Sajip via Python-list
GnuPG -- https://mail.python.org/mailman/listinfo/python-list

Bug in 3.12.5

2024-09-20 Thread Martin Nilsson via Python-list
Dear Sirs ! The attached program doesn’t work in 3.12.5, but in 3.9 it worked. Best Regards Martin Nilsson -- https://mail.python.org/mailman/listinfo/python-list

Common objects for CLI commands with Typer

2024-09-20 Thread Loris Bennett via Python-list
under constuction. -- https://mail.python.org/mailman/listinfo/python-list

Re: Bug in 3.12.5

2024-09-20 Thread Keith Thompson via Python-list
ith.s.thompso...@gmail.com void Void(void) { Void(); } /* The recursive call of the void */ -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Thomas Passin via Python-list
On 9/30/2024 11:30 AM, Barry via Python-list wrote: On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list wrote: import polars as pl pl.read_json("file.json") This is not going to work unless the computer has a lot more the 60GiB of RAM. As later suggested a

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Grant Edwards via Python-list
On 2024-09-30, Left Right via Python-list wrote: > Whether and to what degree you can stream JSON depends on JSON > structure. In general, however, JSON cannot be streamed (but commonly > it can be). > > Imagine a pathological case of this shape: 1... <60GB of digits>. Th

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Chris Angelico via Python-list
On Tue, 1 Oct 2024 at 02:20, Thomas Passin via Python-list wrote: > > On 9/30/2024 11:30 AM, Barry via Python-list wrote: > > > > > >> On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list > >> wrote: > >> > >>

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Left Right via Python-list
4 at 8:44 AM Asif Ali Hirekumbi via Python-list wrote: > > Thanks Abdur Rahmaan. > I will give it a try ! > > Thanks > Asif > > On Mon, Sep 30, 2024 at 11:19 AM Abdur-Rahmaan Janhangeer < > arj.pyt...@gmail.com> wrote: > > > Idk if you tried Polars, but i

ANN: Python Meeting Düsseldorf - 02.10.2024

2024-09-30 Thread eGenix Team via Python-list
h time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 3.13.0rc3 and 3.12.7 released.

2024-10-01 Thread Thomas Wouters via Python-list
to the Python Software Foundation. Regards from a positively *melting* Menlo Park for some reason <https://social.coop/@Yhg1s/113051321976759729>this time, Your release team, Thomas Wouters Łukasz Langa Ned Deily Steve Dower -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Thomas Passin via Python-list
On 9/30/2024 1:00 PM, Chris Angelico via Python-list wrote: On Tue, 1 Oct 2024 at 02:20, Thomas Passin via Python-list wrote: On 9/30/2024 11:30 AM, Barry via Python-list wrote: On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list wrote: import polars as pl pl.read_json

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Dan Sommers via Python-list
On 2024-09-30 at 11:44:50 -0400, Grant Edwards via Python-list wrote: > On 2024-09-30, Left Right via Python-list wrote: > > Whether and to what degree you can stream JSON depends on JSON > > structure. In general, however, JSON cannot be streamed (but commonly > > it can b

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Chris Angelico via Python-list
On Tue, 1 Oct 2024 at 04:30, Dan Sommers via Python-list wrote: > > But why do I need to start with the least > significant digit? If you start from the most significant, you don't know anything about the number until you finish parsing it. There's almost nothing you can say a

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Thomas Passin via Python-list
On 9/30/2024 11:30 AM, Barry via Python-list wrote: On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list wrote: import polars as pl pl.read_json("file.json") This is not going to work unless the computer has a lot more the 60GiB of RAM. As later suggested a

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Dan Sommers via Python-list
On 2024-10-01 at 09:09:07 +1000, Chris Angelico via Python-list wrote: > On Tue, 1 Oct 2024 at 08:56, Grant Edwards via Python-list > wrote: > > > > On 2024-09-30, Dan Sommers via Python-list wrote: > > > > > In Common Lisp, integers can be written in any inte

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Dan Sommers via Python-list
On 2024-09-30 at 18:48:02 -0700, Keith Thompson via Python-list wrote: > 2qdxy4rzwzuui...@potatochowder.com writes: > [...] > > In Common Lisp, you can write integers as #nnR[digits], where nn is the > > decimal representation of the base (possibly without a leading zero), &

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Left Right via Python-list
igned to be streamed. So, that's not a > problem (in principle), but you would need to have a streaming GZip > parser, quick search in PyPI revealed this package: > https://pypi.org/project/gzip-stream/ . > > On Mon, Sep 30, 2024 at 6:20 PM Thomas Passin via Python-list > wro

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Keith Thompson via Python-list
ase. So the input #16f is read as the integer 65535. Typo: You meant #16R, not #16f. -- Keith Thompson (The_Other_Keith) keith.s.thompso...@gmail.com void Void(void) { Void(); } /* The recursive call of the void */ -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Dan Sommers via Python-list
On 2024-09-30 at 21:34:07 +0200, Regarding "Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API," Left Right via Python-list wrote: > > What am I missing? Handwavingly, start with the first digit, and as > > long as the next character

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Left Right via Python-list
ould need to have a streaming GZip parser, quick search in PyPI revealed this package: https://pypi.org/project/gzip-stream/ . On Mon, Sep 30, 2024 at 6:20 PM Thomas Passin via Python-list wrote: > > On 9/30/2024 11:30 AM, Barry via Python-list wrote: > > > > > >> On 30 Se

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Grant Edwards via Python-list
On 2024-09-30, Dan Sommers via Python-list wrote: > On 2024-09-30 at 11:44:50 -0400, > Grant Edwards via Python-list wrote: > >> On 2024-09-30, Left Right via Python-list wrote: >> > [...] >> > Imagine a pathological case of this shape: 1... <60GB of digits&g

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Grant Edwards via Python-list
On 2024-09-30, Dan Sommers via Python-list wrote: > In Common Lisp, integers can be written in any integer base from two > to thirty six, inclusive. So knowing the last digit doesn't tell > you whether an integer is even or odd until you know the base > anyway. I had to think

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Chris Angelico via Python-list
On Tue, 1 Oct 2024 at 08:56, Grant Edwards via Python-list wrote: > > On 2024-09-30, Dan Sommers via Python-list wrote: > > > In Common Lisp, integers can be written in any integer base from two > > to thirty six, inclusive. So knowing the last digit doesn't tell >

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Dan Sommers via Python-list
On 2024-10-01 at 04:46:35 +1000, Chris Angelico via Python-list wrote: > On Tue, 1 Oct 2024 at 04:30, Dan Sommers via Python-list > wrote: > > > > But why do I need to start with the least > > significant digit? > > If you start from the most significant, you d

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Left Right via Python-list
to sync _everything_ (and it hurts!) On Tue, Oct 1, 2024 at 5:49 PM Dan Sommers via Python-list wrote: > > On 2024-09-30 at 21:34:07 +0200, > Regarding "Re: Help with Streaming and Chunk Processing for Large JSON Data > (60 GB) from Kenna API," > Left Right via Python-lis

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-01 Thread Greg Ewing via Python-list
written little endian instead of big endian, but the same argument applies either way. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.8 or later on Debian?

2024-09-19 Thread Mats Wichmann via Python-list
On 9/18/24 08:49, Ulrich Goebel via Python-list wrote: Hi, Debian Linux seems to love Python 3.7 - that is shown by apt-get list, and it's installed on my Debian Server. But I need at least Python 3.8 Is there a repository which I can give to apt to get Python 3.8 or later? Or do I r

Re: Python 3.8 or later on Debian?

2024-09-18 Thread Thomas Passin via Python-list
On 9/18/2024 10:49 AM, Ulrich Goebel via Python-list wrote: Hi, Debian Linux seems to love Python 3.7 - that is shown by apt-get list, and it's installed on my Debian Server. But I need at least Python 3.8 Is there a repository which I can give to apt to get Python 3.8 or later? Or

How to stop a specific thread in Python 2.7?

2024-09-25 Thread marc nicole via Python-list
() event_thread1.set() I know that set() will kill all running threads, but if there was thread2 as well and I want to kill only thread1? Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Chris Angelico via Python-list
s of > symbols of the alphabet of fixed length. This is, essentially, like > saying that the words themselves are regular. One single IP packet is all you can parse. You're playing shenanigans with words the way Humpty Dumpty does. IP packets are not sequences, they are individuals. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Python crash together with threads

2024-10-02 Thread Guenther Sohler via Python-list
_Py_EnsureTstateNotNULL(tstate); #endif # <<--- suspect state is nullpointer return tstate->interp; } any clues , whats going on here, and how I can mitigate that ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Left Right via Python-list
P packet is all you can parse. You're playing shenanigans > with words the way Humpty Dumpty does. IP packets are not sequences, > they are individuals. > > ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Python crash together with threads

2024-10-02 Thread Louis Krupp via Python-list
rates the problem? Louis -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Left Right via Python-list
that there's no way to tell if my notion of streaming is correct or not. But, for the future reference: my notion of streaming is correct, and you would do better learning some materials about it before jumping to conclusions. -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Left Right via Python-list
#x27;d typically study in automata theory class. Well, not exactly in the very same words, but you should be able to figure this stuff out if you had that class. -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Chris Angelico via Python-list
On Wed, 2 Oct 2024 at 23:53, Left Right via Python-list wrote: > In the same email you replied to, I gave examples of languages for > which parsers can be streaming (in general): SCSI or IP. You can't validate an IP packet without having all of it. Your notion of "streaming

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-02 Thread Ethan Furman via Python-list
This thread is derailing. Please consider it closed. -- ~Ethan~ Moderator -- https://mail.python.org/mailman/listinfo/python-list

doRe: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-10-03 Thread Greg Ewing via Python-list
er in that respect. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Two python issues

2024-11-06 Thread Roel Schroeven via Python-list
Op 5/11/2024 om 15:48 schreef Raymond Boute via Python-list: L.S., Python seem to suffer from a few poor design decisions regarding strings and lists that affect the elegance of the language. (a) An error-prone "feature" is returning -1 if a substring is not found by "

Re: Two aces up Python's sleeve

2024-11-07 Thread Greg Ewing via Python-list
think. BTW you have to be careful testing this, because the compiler sometimes does constant folding, so you need to be sure it's actually computing the numbers at run time. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Old matplotlib animation now fails

2024-10-15 Thread Martin Schöön via Python-list
how to correct my code. Hence, this call for help. Any ideas? TIA /Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: Specifying local dependency with Poetry

2024-11-05 Thread Greg Ewing via Python-list
on found for first-package<2.0.0,>=1.6.0 (from second-package==0.5.0) What version number does first-package have? The caret in the specification "^1.6.0" restricts it to 1.x.x versions. If you don't want that restriction, use ">=" instead. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Two python issues

2024-11-06 Thread Piergiorgio Sartor via Python-list
ength of a program would be measured by the time needed to understand it, some programs are too short to be short." bye, -- piergiorgio -- https://mail.python.org/mailman/listinfo/python-list

Re: Specifying local dependency with Poetry

2024-11-06 Thread Loris Bennett via Python-list
t to 1.x.x versions. > > If you don't want that restriction, use ">=" instead. The first package has the version number 1.6.0. -- This signature is currently under constuction. -- https://mail.python.org/mailman/listinfo/python-list

Re: Two aces up Python's sleeve

2024-11-08 Thread Mild Shock via Python-list
thing like -5 to 256 I think. BTW you have to be careful testing this, because the compiler sometimes does constant folding, so you need to be sure it's actually computing the numbers at run time. -- https://mail.python.org/mailman/listinfo/python-list

Re: Two aces up Python's sleeve

2024-11-08 Thread Mild Shock via Python-list
umbers at run time. -- https://mail.python.org/mailman/listinfo/python-list

Re: Two aces up Python's sleeve

2024-11-08 Thread Mild Shock via Python-list
ed to be something like -5 to 256 I think. BTW you have to be careful testing this, because the compiler sometimes does constant folding, so you need to be sure it's actually computing the numbers at run time. -- https://mail.python.org/mailman/listinfo/python-list

Re: Two aces up Python's sleeve (Posting On Python-List Prohibited)

2024-11-08 Thread Mild Shock via Python-list
this behavior is because python's integers are immutable. Nothing to do with that. ++x or x++ will redefine 5 to 6, which the interpreter forbids ... One of those is actually syntactically valid. It just won’t do what you expect it to do. -- https://mail.python.org/mailman/listinfo/python-list

Re: Two aces up Python's sleeve

2024-11-08 Thread Mild Shock via Python-list
++ and ++x, it avoids the pre- and post-increment (substitute-increment v. increment-substitute) bugs that plagues C and it's children. -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-14 Thread Michael Torrie via Python-list
r of that little treatise. -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-13 Thread Kushal Kumaran via Python-list
at the exception details: they should tell you what really > was not found (maybe the directory for the logfile). It is possible a directory along the path does not exist. -- regards, kushal -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-13 Thread Michael Torrie via Python-list
On 11/12/24 12:10 PM, Left Right via Python-list wrote: > But, it's > impossible to reliably rotate a log file. There's always a chance > that during the rotation some log entries will be written to the file > past the point of rotation, but prior to the point where the nex

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-14 Thread Jon Ribbens via Python-list
never once worried about problems GNU tail > might have with a file that gets rotated out from under you. Not sure > why the author is so fixated on it. I really wouldn't worry about anything Jonathan de Boyne Pollard says. -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-14 Thread Ethan Furman via Python-list
On 11/13/24 23:03, Left Right via Python-list wrote: >> On any Unix system this is untrue. Rotating a log file is quite simple: > > I realized I posted this without cc'ing the list: > http://jdebp.info/FGA/do-not-use-logrotate.html . > > The link above gives a more d

How to break while loop based on events raised in a thread (Python 2.7)

2024-11-27 Thread marc nicole via Python-list
ow I perform multiple checks at each if or while statement, but is there a IO async based method that breaks out of the loop when the event is raised in the thread? -- https://mail.python.org/mailman/listinfo/python-list

Cheetah 3.4.0

2024-12-02 Thread Oleg Broytman via Python-list
#x27;name'] is $person['mood'] #end for Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-13 Thread Left Right via Python-list
hile the latter are :) -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-14 Thread Chris Angelico via Python-list
On Thu, 14 Nov 2024 at 18:05, Left Right via Python-list wrote: > > > On any Unix system this is untrue. Rotating a log file is quite simple: > > I realized I posted this without cc'ing the list: > http://jdebp.info/FGA/do-not-use-logrotate.html . > > The lin

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-14 Thread Loris Bennett via Python-list
hell gives you a really, really simple > way of redirecting stderr to a file. So, really, there aren't any > excuses to do that. I don't quite understand what your suggestion is. Do you mean that I should log to stderr and then run my program as my_program ... 2>&1 | logger ? Cheers, Loris -- This signature is currently under constuction. -- https://mail.python.org/mailman/listinfo/python-list

ANN: eGenix PyRun - One file Python Runtime 2.6.0

2024-11-14 Thread eGenix Team via Python-list
://www.malemburg.com/ -- https://mail.python.org/mailman/listinfo/python-list

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-14 Thread D'Arcy Cain via Python-list
On 11/13/24 02:12, Roel Schroeven via Python-list wrote: What I most often do is use one logfile per day, with the date in the filename. Then simply delete all files older than 7 days, or 30 days, or whatever is useful for the task at hand. Not only does that sidestep any issues with rotating

RE: super().__init__() and bytes

2024-12-03 Thread Anders Munch via Python-list
def __new__(cls, whatever, arguments, you, like): bytesvalue = compute(whatever, arguments, you, like) ob = bytes.__new__(cls, bytesvalue) ob.some_other_att = compute_something_else(whatever, arguments, you, like) return ob regards, Anders -- https://mail.python.org/mailman/listinfo/python-list

Re: super().__init__() and bytes

2024-12-03 Thread Roel Schroeven via Python-list
Op 3/12/2024 om 10:41 schreef Roel Schroeven via Python-list: [...] When I try the same with bytes as base class though, that doesn't work (at least in the Python version I'm using, which is CPython 3.11.2 64-bit on Windows 10): class MyBytes(bytes):     def __init__(

Re: super().__init__() and bytes

2024-12-03 Thread Roel Schroeven via Python-list
Op 3/12/2024 om 13:55 schreef Anders Munch via Python-list: Roel Schroeven wrote: > As a follow-up, it looks like this behavior is because bytes and int are immutable. Yes. OK. > But that doesn't tell me why using super().__init__() doesn't work for immutable classes. byt

super().__init__() and bytes

2024-12-03 Thread Roel Schroeven via Python-list
ut conversely, the dolphins had always believed that they were far more intelligent than man — for precisely the same reasons." -- Douglas Adams -- https://mail.python.org/mailman/listinfo/python-list

<    47   48   49   50   51   52   53   54   55   56   >