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
Could you show a python code example of this? On Thu, 26 Sept 2024, 03:08 Cameron Simpson, wrote: > 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 funct

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, < [email protected]> 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
y) modify the shared state observed by other threads in such a way that it becomes unusable to other threads. So... if you want to kill a thread, I'm sorry to say this: you will have to bring down the whole process, there's really no other way, and that's not Python-specific, this is

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
other points via this group). Enjoy! Cheers Vinay Sajip [1] https://github.com/vsajip/python-gnupg [2] https://pypi.org/project/python-gnupg/0.5.3 [3] https://github.com/vsajip/python-gnupg/issues [4] https://github.com/vsajip/python-gnupg/releases/ [5] python-gnupg - A Python wrapper for

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
[email protected] 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 < > [email protected]> 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
/This announcement is in German since it targets a local user group//meeting in Düsseldorf, Germany/ Ankündigung Python Meeting Düsseldorf - Oktober 2024 <https://www.egenix.com/company/news/Python-Meeting-Duesseldorf-2024-10-02> Ein Treffen von Python Enthusiast

[RELEASE] Python 3.13.0rc3 and 3.12.7 released.

2024-10-01 Thread Thomas Wouters via Python-list
This is not the release you’re looking for… (unless you’re looking for 3.12.7.) Because no plan survives contact with reality, instead of the actual Python 3.13.0 release we have a new Python 3.13 release candidate today. Python 3.13.0rc3 rolls back the incremental cyclic garbage collector (GC

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: > [email protected] 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) [email protected] 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
My Software project is working fine in most of the cases (www.pythonscad.org) however I am right now isolating a scenario, which makes it crash permanently. It does not happen with Python 3.11.6 (and possibly below), it happens with 3.12 and above It does not happen when not using Threads

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
On 10/2/2024 7:26 AM, Guenther Sohler wrote: My Software project is working fine in most of the cases (www.pythonscad.org) however I am right now isolating a scenario, which makes it crash permanently. It does not happen with Python 3.11.6 (and possibly below), it happens with 3.12 and above

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
Some years ago I created a Python program that reads GPS data and creates an animation stored in an mp4 file. Not very elegant but it worked. Not very original as it was based on the example found here: https://shorturl.at/dTCZZ Last time it worked was about a year ago. Since then I have moved

Re: Specifying local dependency with Poetry

2024-11-05 Thread Greg Ewing via Python-list
On 6/11/24 4:13 am, Loris Bennett wrote: [tool.poetry.dependencies] python = "^3.6" first-package = "^1.6.0" Could not find a version that satisfies the requirement first-package<2.0.0,>=1.6.0 (from second-package==0.5.0) (from versions: ) No matching distributi

Re: Two python issues

2024-11-06 Thread Piergiorgio Sartor via Python-list
On 05/11/2024 15.48, Raymond Boute wrote: 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 "find", since -1 cur

Re: Specifying local dependency with Poetry

2024-11-06 Thread Loris Bennett via Python-list
Greg Ewing writes: > On 6/11/24 4:13 am, Loris Bennett wrote: >> [tool.poetry.dependencies] >> python = "^3.6" >> first-package = "^1.6.0" >>Could not find a version that satisfies the requirement >> first-package<2.0.0,>=1.6.0 (from

Re: Two aces up Python's sleeve

2024-11-08 Thread Mild Shock via Python-list
Hi, In Java its possible to work this way with the Integer datatype, just call Integer.valueOf(). I am not sure whether CPython does the same. Because it shows me the same behaviour for small integers that are more than only in the range -128 to 128. You can try yourself: Python 3.14.0a1

Re: Two aces up Python's sleeve

2024-11-08 Thread Mild Shock via Python-list
For example this article: https://www.codementor.io/@arpitbhayani/python-caches-integers-16jih595jk about the integer singletons claims: >>> x, y = 257, 257 >>> id(x) == id(y) False But on Windows my recent CPython doesn't do that: Python 3.14.0a1 (tags/v3.14.0a1:8

Re: Two aces up Python's sleeve

2024-11-08 Thread Mild Shock via Python-list
The wiked brain of ChatGPT gives me a lead: PEP 659 Storing data caches before the bytecode. Maybe its an effect of constant folding and constant pooling by the compiler? Mild Shock schrieb: For example this article: https://www.codementor.io/@arpitbhayani/python-caches-integers-16jih595jk

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

2024-11-08 Thread Mild Shock via Python-list
Well you can use your Browser, since JavaScript understand post and pre increment: > x = 5 5 > x ++ 5 > x = 5 5 > ++ x 6 So we have x ++ equals in Python: x + = 1 x - 1 And ++ x equals in Python: x += 1 x But I don't know how to combine an assignment and a

Re: Two aces up Python's sleeve

2024-11-08 Thread Mild Shock via Python-list
This only works for small integers. I guess this is because tagged pointers are used nowadays ? For large integers, also known as bigint, it doesn't work: Python 3.13.0a1 (tags/v3.13.0a1:ad056f0, Oct 13 2023, 09:51:17) >>> x, y = 5, 4+1 >>> id(x) == id(y) True >>

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
Hello! I'm pleased to announce version 3.4.0, the final release of branch 3.4 of CheetahTemplate3. What's new in CheetahTemplate3 == This release spans two topics: adapting to Python 3.13 and fixes in import hooks. Bug fixes: - Fixed ``ImportHooks`

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
*ANNOUNCING* eGenix PyRun - One file Python Runtime Version 2.6.0 Python runtime taking up just 4-6MB on disk This announcement is also available on our web-site for online reading: https://www.egenix.com/company/news/eGenix-PyRun-2.6.0-GA.html

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
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__(self, data):     super().__init__(data) print(MyBytes(b'abcdefghijlkmn')) This results in an exception: Traceback (most recen

Re: Cheetah 3.4.0

2024-12-03 Thread Mohammadreza Saveji via Python-list
Thanks a lot Oleg sincerely yours On Mon, Dec 2, 2024 at 5:27 PM Oleg Broytman via Python-list < [email protected]> wrote: > Hello! > > I'm pleased to announce version 3.4.0, the final release > of branch 3.4 of CheetahTemplate3. > > >

Re: super().__init__() and bytes

2024-12-04 Thread Roel Schroeven via Python-list
Op 4/12/2024 om 0:14 schreef Greg Ewing via Python-list: On 4/12/24 3:24 am, Roel Schroeven wrote: It's not entirely clear to me though how bytes.__new__ *can* set an object's value. Isn't __new__ also a regular function? Yes, but the __new__ methods of the builtin immutable ob

Re: [RELEASE] Python 3.13.1, 3.12.8, 3.11.11, 3.10.16 and 3.9.21 are now available

2024-12-03 Thread Jason Friedman via Python-list
🙏 On Tue, Dec 3, 2024 at 5:06 PM Thomas Wouters via Python-list < [email protected]> wrote: > Another big release day! Python 3.13.1 and 3.12.8 were regularly scheduled > releases, but they do contain a few security fixes. That makes it a nice > time to release the se

Re: super().__init__() and bytes

2024-12-03 Thread Greg Ewing via Python-list
are able to do things that Python methods cannot. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

How to catch a fatal error in Python 2.7?

2024-12-09 Thread marc nicole via Python-list
Hello, The fatal error exits the program with a code -1 while referencing the memory address involved and nothing else. How to catch it in Python 2.7? PS: please not I am not talking about exceptions but an error resulting from the disconnection of my bluetooth microphone abruptly and leading

Re: How to catch a fatal error in Python 2.7?

2024-12-09 Thread Michael Torrie via Python-list
On 12/9/24 12:19 PM, marc nicole via Python-list wrote: > Hello, > > The fatal error exits the program with a code -1 while referencing the > memory address involved and nothing else. > > How to catch it in Python 2.7? Does the problem occur with Python 3.x? At this date,

Re: it's a shame... python error over error

2025-01-03 Thread Chris Angelico via Python-list
On Sat, 4 Jan 2025 at 09:22, aotto1968 via Python-list wrote: > > On 30.12.24 18:29, Michael Torrie wrote: > > On 12/26/24 12:34 AM, aotto1968 via Python-list wrote: > >> sorry you don't understand the problem… > >> > >> > You managed to make a

How to manage accented characters in mail header?

2025-01-06 Thread Chris Green via Python-list
I have a Python script that filters my incoming E-Mail. It has been working OK (with various updates and improvements) for many years. I now have a minor new problem when handling E-Mail with a From: that has accented characters in it:- From: Sébastien Crignon I use Python mailbox to

Re: How to manage accented characters in mail header?

2025-01-06 Thread Chris Green via Python-list
Stefan Ram wrote: > Chris Green wrote or quoted: > >From: =?utf-8?B?U8OpYmFzdGllbiBDcmlnbm9u?= > > In Python, when you roll with decode_header from the email.header > module, it spits out a list of parts, where each part is like > a tuple of (decoded string, cha

Re: How to manage accented characters in mail header?

2025-01-06 Thread Peter Pearson via Python-list
On Sat, 4 Jan 2025 14:31:24 +, Chris Green wrote: > I have a Python script that filters my incoming E-Mail. It has been > working OK (with various updates and improvements) for many years. > > I now have a minor new problem when handling E-Mail with a From: that > has accente

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

2025-01-07 Thread Vinay Sajip via Python-list
dback is most welcome (especially bug reports [3], patches and suggestions for improvement, or any other points via this group). Enjoy! Cheers Vinay Sajip [1] https://github.com/vsajip/python-gnupg [2] https://pypi.org/project/python-gnupg/0.5.4 [3] https://github.com/vsajip/python-gnupg/issu

Re: Add the numbers in a 9x9 multiplication Table

2025-01-07 Thread Kaz Kylheku via Python-list
m m^2 + 2km, which has the right shape to preserve the square property, and that with some algebra we can identify m as m = n + 1. -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @[email protected] -- https://mail.python.org/mailman/listinfo/python-list

ANN: Happy 2025 with DIPY 1.10.0 💥

2025-01-07 Thread Eleftherios Garyfallidis via Python-list
ttps://mail.python.org/mailman/listinfo/python-list

Re: it's a shame... python error over error

2024-12-30 Thread Michael Torrie via Python-list
On 12/26/24 12:34 AM, aotto1968 via Python-list wrote: > sorry you don't understand the problem… > > > You managed to make a build of Python that attempts to link to a DLL > > I never touch the OpenSUSE python. the OpenSUSE python try to use my > sqalite3. The *only*

Re: it's a shame... python error over error

2024-12-25 Thread Michael Torrie via Python-list
On 12/25/24 3:55 PM, Chris Angelico via Python-list wrote: > On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list > wrote: >> It is not only an *usage* error it is also an *security* error because: >> >> 1) "cnf" is using OS python >> 2) os "r

Re: it's a shame... python error over error

2024-12-25 Thread Michael Torrie via Python-list
On 12/25/24 8:55 PM, Michael Torrie wrote: > This is Python related, but > it's not necessarily python's fault per se. It's also a good reminder to use venv. Then there's no way of activating your custom python with its custom sqlite3 library unless you explicitly ac

Re: it's a shame... python error over error

2024-12-25 Thread Chris Angelico via Python-list
On Thu, 26 Dec 2024 at 14:57, Michael Torrie via Python-list wrote: > > On 12/25/24 3:55 PM, Chris Angelico via Python-list wrote: > > On Thu, 26 Dec 2024 at 09:27, aotto1968 via Python-list > > wrote: > >> It is not only an *usage* error it is also an *security* error

Re: it's a shame... python error over error

2024-12-26 Thread Michael Torrie via Python-list
On 12/25/24 10:46 PM, Chris Angelico wrote: > Right. That's exactly what would happen if he'd built Python using > absolute paths to libraries, which is the normal way to do it. And so > the solution is to rebuild Python using absolute paths to libraries. You're right. De

Re: Python List is Not Dead

2024-12-26 Thread Cameron Simpson via Python-list
of the time, and file both posts from Discourse and posts from python-list into my "python" mail folder. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python List is Not Dead

2024-12-29 Thread Cameron Simpson via Python-list
On 29Dec2024 07:16, Kevin M. Wilson wrote: Excuse please, my failure. As I have not been following this discussion, why is the subject "Python List Is NOT Dead" a subject for discussion? Has the list been moving towards closing? No, the list's still around. But there wa

Re: Python List is Not Dead

2024-12-29 Thread Mats Wichmann via Python-list
On 12/29/24 15:10, Cameron Simpson via Python-list wrote: On 29Dec2024 07:16, Kevin M. Wilson wrote: Excuse please, my failure. As I have not been following this discussion, why is the subject "Python List Is NOT Dead" a subject for discussion? Has the list been moving towards clo

Re: it's a shame... python error over error

2024-12-29 Thread Chris Angelico via Python-list
On Mon, 30 Dec 2024 at 15:02, aotto1968 via Python-list wrote: > > You managed to make a build of Python that attempts to link to a DLL > > I never touch the OpenSUSE python. the OpenSUSE python try to use my > sqalite3. You keep saying this, but do you even know what "make

Re: Python List is Not Dead

2024-12-28 Thread Mohammadreza Saveji via Python-list
thank you Mr. Jahangir. you are expert in python. On Fri, Dec 27, 2024 at 2:28 AM Cameron Simpson via Python-list < [email protected]> wrote: > On 25Dec2024 14:52, Abdur-Rahmaan Janhangeer wrote: > >I have been following discussions on Discourse (discuss.python.org) >

Re: Python List is Not Dead

2024-12-30 Thread Grant Edwards via Python-list
On 2024-12-27, Chris Green via Python-list wrote: > Cameron Simpson wrote: >> On 25Dec2024 14:52, Abdur-Rahmaan Janhangeer wrote: >> >I have been following discussions on Discourse (discuss.python.org) >> >these last times. >> > >> >I think tha

Re: Any way to "subclass" typing.Annotated?

2025-01-31 Thread Fabien LUCE via Python-list
Maybe you'd better use descriptors? On Tue, 28 Jan 2025 at 23:03, Ian Pilcher via Python-list < [email protected]> wrote: > (Note: I have mail delivery disabled for this list and read it through > GMane. Please copy me on any responses, so that I can respond with &

<    56   57   58   59   60   61   62   63   64   65   >