Well, that was the more important thing to do. :)
--
https://mail.python.org/mailman3//lists/python-list.python.org
Hi Steve, ask away...
On 11/09/25 16:15, Steve Jorgensen via Python-list wrote:
I posted a question here several days ago and received a "Welcome to the
"Python-list" mailing list!" email, but I still don't see my question in the list.
I'm posting this mainly to
ebug mode enabled: Using pdb post-mortem on uncaught exceptions.
Uncaught exception: ZeroDivisionError: division by zero
> debug_hook.py(19)cause_exception()
-> return 1 / 0 # Will raise ZeroDivisionError
(Pdb) i
3
(Pdb)
.
--
https://mail.python.org/mailman3//lists/python-list.python.org
nd down my backtrace like I am in gdb.
In fact, it is better than gdb. I can use evaluate any python expression
directly, and verify the shape of my tensors and exactly what caused
the error. It's like freezing the entire program right at the time the
program failed. This way I don't hav
tters for a class and its
instances.
Does anyone know of anywhere in the Python docs or PEPs that have the
information needed to predict this behavior?
--
https://mail.python.org/mailman3//lists/python-list.python.org
I posted a question here several days ago and received a "Welcome to the
"Python-list" mailing list!" email, but I still don't see my question in the
list.
I'm posting this mainly to see if it shows up, or I get a reply from a
moderator, or something like tha
On 7/09/25 00:47, Rob Cliffe via Python-list wrote:
I quite often find myself writing expressions of the form
someString[x : x+n]
where n is often an int and x may be an int, a variable, or a (possibly
complicated) expression.
0 A PEP
1 A helper-function
eg slice_by_length
(or less plausibly "321").
I don't have a strong opinion on this; there may be good reasons for
preferring one to another.
Does anybody think this is a good idea?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman3//lists/python-list.python.org
On 03/09/2025 15:45, Oscar Benjamin wrote:
On Wed, 3 Sep 2025, 15:40 Rob Cliffe, wrote:
On 03/09/2025 15:35, Oscar Benjamin wrote:
On Wed, 3 Sep 2025, 15:21 Rob Cliffe via Python-list,
wrote:
On 03/09/2025 14:59, Mats Wichmann wrote:
> On 9/3/25 07
I have not installed python for a long time so I am not sure whether the
following configure flags are sufficient/recommandable for a
Python3.12.11 installation.
--prefix=/opt
--with-lto
--enable-optimizations
--enable-loadable-sqlite-extensions
--with-ensurepip=install
--with-pydebug
--with
very few weeks or so, when they add
a new breaking change. Conda world brings a lot of unnecessary
suffering...
--
https://mail.python.org/mailman3//lists/python-list.python.org
How do you start (and thus run) a Python project?
tldr; question in last paragraph
Two articles appeared in my InTray:
- Reuven Lerner (Python Trainer) saying "You’re probably using uv wrong"
(https://lerner.co.il/2025/08/28/youre-probably-using-uv-wrong/),
NB adapted from [hi
7;d appreciate it if someone could advise me on which version of Python is
recommended for that operating system.
Thank you very much.
Arodri
Thomas Passin escreveu (terça, 2/09/2025 à(s) 23:24):
> On 9/2/2025 11:29 AM, amrodi--- via Python-list wrote:
> > I'm new to Python.
>
"pip install
./matplotlib-3.9.2-cp313-cp313-win_amd64.whl". You will probably get
an error, and hopefully, the error message will give you some idea
about why it couldn't install this in your initial attempt.
On Tue, Sep 2, 2025 at 11:00 PM Rob Cliffe via Python-list
wrote:
>
> He
On Wed, 3 Sep 2025, 15:40 Rob Cliffe, wrote:
>
>
> On 03/09/2025 15:35, Oscar Benjamin wrote:
>
>
>
> On Wed, 3 Sep 2025, 15:21 Rob Cliffe via Python-list, <
> python-list@python.org> wrote:
>
>>
>>
>> On 03/09/2025 14:59, Mats Wic
On 03/09/2025 15:35, Oscar Benjamin wrote:
On Wed, 3 Sep 2025, 15:21 Rob Cliffe via Python-list,
wrote:
On 03/09/2025 14:59, Mats Wichmann wrote:
> On 9/3/25 07:20, Rob Cliffe wrote:
>>
>>
>> On 03/09/2025 00:01, Mats Wichmann wrote:
>
On Wed, 3 Sep 2025, 15:21 Rob Cliffe via Python-list, <
python-list@python.org> wrote:
>
>
> On 03/09/2025 14:59, Mats Wichmann wrote:
> > On 9/3/25 07:20, Rob Cliffe wrote:
> >>
> >>
> >> On 03/09/2025 00:01, Mats Wichmann wrote:
> &g
On 03/09/2025 14:59, Mats Wichmann wrote:
On 9/3/25 07:20, Rob Cliffe wrote:
On 03/09/2025 00:01, Mats Wichmann wrote:
On 9/2/25 14:51, Rob Cliffe via Python-list wrote:
There are two roots here:
(1) it's not finding a prebuilt wheel. You can see that because
it's propos
On 03/09/2025 00:01, Mats Wichmann wrote:
On 9/2/25 14:51, Rob Cliffe via Python-list wrote:
There are two roots here:
(1) it's not finding a prebuilt wheel. You can see that because it's
proposing to use the source distribution instead:
> Collecting matplotlib
>
On Tue, Sep 2, 2025 at 1:46 PM amrodi--- via Python-list
wrote:
>
> I'm new to Python.
> Operating System - Windows XP SP3
> Python 2.7 installed.
>
> I got a script that tries to improve the image?
> I created a bat file using the command line.
>
> C:\pyth
Hello, can anyone help? All assistance gratefully received. I am
running python 3.13.3 on a Windows 11 machine and trying to do
pip install matplotlib
(No, I don't need to say "python -m ...", I am running the right version
of python.exe.)
This starts by generating the f
t have to juggle with local variables. The finally
block can write to the return value, so there is no reason to hide the return
value or already caught exceptions here. This would make the code much cleaner
and avoids messing up with the scope of variables.
--
https://mail.python.org/mailman3//lists/python-list.python.org
Save restored image
sharp.save("STC_restaurada.jpg")
--
https://mail.python.org/mailman3//lists/python-list.python.org
I'm new to Python.
Operating System - Windows XP SP3
Python 2.7 installed.
I got a script that tries to improve the image?
I created a bat file using the command line.
C:\python27\python.exe d:\temp\teste.py
But even though it runs, it displays an error:
"... no encoding declar
On 01/09/2025 14:26, marius.spix--- via Python-list wrote:
In your example when would isinstance(__exit_context__, ReturnContext)
be True and when would it be False? What would __exit_context__.value
be? I can't think of a sensible meaning for it. If no exception occurs,
is the value ret
On 01/09/2025 14:26, marius.spix--- via Python-list wrote:
In your example when would isinstance(__exit_context__, ReturnContext)
be True and when would it be False? What would __exit_context__.value
be? I can't think of a sensible meaning for it. If no exception occurs,
is the value ret
easier.
What do you think?
Best wishes
Marius Spix
--
https://mail.python.org/mailman3//lists/python-list.python.org
in order to censor information, such as BitTorrent and
P2P which Python was influential of.
The first implementation and introduction of BitTorrent was in Python.
I supose, that someone would remake this movie, adding more significant
historical events; and, please, remove those brands from those
yet, why not just use Lisp instead? You'd save yourself so much
busy work and have a much nicer tool...
--
https://mail.python.org/mailman3//lists/python-list.python.org
On 30/08/2025 12:03, marius.spix--- via Python-list wrote:
Dear mailing list,
there is currently no direct way to observe the current interpreter state in a
finally block without tracing.
My idea is introducing an immutable __exit_context__ magic variable, which
would have one of three
):
log_return(__exit_context__.value)
return __exit_context__.value + 1
I wonder if it would be a candidate for a PEP to be implemented in the Python
standard.
Best regards
Marius Spix
--
https://mail.python.org/mailman3//lists/python-list.python.org
> Had this 'live-test' failed, where would Python be today?
I'm not sure if this is irony or do you honestly believe it
succeeded... but I think that "where Python is today" is pretty
indicative of failure. To me, however, the failure started with the
whole Python 3.X
On Fri, Aug 29, 2025 at 3:37 PM Larry Martell via Python-list <
python-list@python.org> wrote:
> https://www.youtube.com/watch?v=GfH4QL4VqJ0
>
> Watched this last night. Overall I enjoyed it (but my wife, who is not a
> programmer, fell asleep). My only quibble is that they s
To you (if apparently in-reply to the OP),
On 30/08/25 07:19, Larry Martell via Python-list wrote:
https://www.youtube.com/watch?v=GfH4QL4VqJ0
Watched this last night. Overall I enjoyed it (but my wife, who is not a
programmer, fell asleep). My only quibble is that they spent too much time
https://www.youtube.com/watch?v=GfH4QL4VqJ0
Watched this last night. Overall I enjoyed it (but my wife, who is not a
programmer, fell asleep). My only quibble is that they spent too much time
talking about the walrus controversy.
--
https://mail.python.org/mailman3//lists/python-list.python.org
The suggestion (below) is good-practice. However, it's advanced-Python
compared to the OP's first-course progress.
What is disappointing, is that instead of general strings as file-names
the class has not been introduced to pathlib
(https://docs.python.org/3/library/pathlib.html).
On 29/08/25 10:52, Grant Edwards via Python-list wrote:
On 2025-08-28, Mark Bourne wrote:
Ethan Carter wrote:
PS. Is it just me or there's just us in this used-to-be-very-active
group? Thanks for being my teacher here. Have a good day!
Until a few months ago, there was a gateway
things like programming
lanugages by watching Youtube videos. [Talk about the worst possible
medium for a particular subject...]
--
Grant
--
https://mail.python.org/mailman3//lists/python-list.python.org
ystem won't 'delete'
the actual file (inode and associated storage blocks) unless that was
the only link to the inode and there are no open file handles
associated with the inode. When the total number of links/handles
drops to zero, then the filesystem will 'delete' the file.
--
https://mail.python.org/mailman3//lists/python-list.python.org
On 2025-08-27, Chris Angelico via Python-list wrote:
> On Thu, 28 Aug 2025 at 01:28, Ethan Carter wrote:
>> def copy(s, d):
>> """Copies text file named S to text file named D."""
>> with open(s) as src:
>> with open(d,
two opens into a single with
statement. If you can guarantee a minimum Python version of 3.10
(released 2020, now in source-only-fix mode, so any fully supported
version will indeed be >=3.10), you can write it like this:
with (open(s) as src,
open(d, "w") as dst):
or this:
w
an3//lists/python-list.python.org
Hello,
I recently hacked together a script called entanglement.py that uses
libclang to parse C++ headers and generate a Python wrapper that can
call the C++ symbols in a .so directly. The Itanium C++ ABI is easy
enough to call from ctypes with 1 exception. Returning a class by
value from C
en all the consumers finished, the queue is
still not empty. So the producers can't finish.
I am very confused about this. Why use lock has synchronization problem. It
seems when the last producer put None to queue, other producers still can
put normal data to queue. I am not famil
On 2025-08-05, Michael Torrie via Python-list wrote:
> On 5/24/25 7:19 PM, Chris Angelico via Python-list wrote:
>> On Sun, 25 May 2025 at 10:05, Rob Cliffe via Python-list
>> wrote:
>>> Yes, but if I understand correctly, they all start from a single
>>>
On 5/24/25 7:19 PM, Chris Angelico via Python-list wrote:
> On Sun, 25 May 2025 at 10:05, Rob Cliffe via Python-list
> wrote:
>> Yes, but if I understand correctly, they all start from a single
>> directory (and work downwards if required).
>> My suggestion involved sear
It’s the first 3.14 release candidate!
https://www.python.org/downloads/release/python-3140rc1/
This release, 3.14.0rc1, is the penultimate release preview. Entering the
release candidate phase, only reviewed code changes which are clear bug
fixes are allowed between this release candidate and
to ``markers``.
* Fix #238: Add build tag to wheel metadata if specified.
* Fix #243: Update to support free-threading version of Python (3.13t).
* Fix #246: Support subdirectories in the dist-info directory. Thanks to Pieter
P for the patch.
* Fix #248: Fix path normalization issue caused by
Dear Sirs.
I found the following sentence in the Python documentation: "The statements
executed by the top-level invocation of the interpreter, either read from a
script file or interactively, are considered part of a module called
__main__<https://docs.python.org/3.11/library/__mai
I was surprised to find that in configparser, getboolean() does not
raise KeyError for a non-existent config parameter.
Demo program (Python 3.11.5, Windows 11):
import configparser
config = configparser.ConfigParser()
config.read('ThisFileDoesNotExist.ini') # This line could
I am using Python 3.13.3 on Windows 11.
I notice that the compiler can optimise (some) constant expressions
containing operators plus numbers or strings, e.g.
2+2 is compiled as 4
1 + (2.5 + 3+4j) is compiled as 6.5+4j
'a' + 'b' is compiled as 'ab'
Other languages uses thread pool, instead of creating new thread.
In Python,loop.run_in_executor uses thread pool.
https://docs.python.org/3.13/library/asyncio-eventloop.html#asyncio.loop.run_in_executor
2025年6月24日(火) 8:12 Mild Shock :
>
> So what does:
>
> stats = await async
reads from the equation?
Also... I have no idea why Python needs async/await. It's a very
confusing and unwieldy interface to epoll. I never found a practical
reason to use this, unless in the situation where someone else used
this in their library, and I had to use the library. All in all,
last case.
--
If your user interface is intuitive in retrospect ... it isn't intuitive
--
https://mail.python.org/mailman3//lists/python-list.python.org
The solution was provided in this thread here:
https://discuss.python.org/t/extended-import-syntax-for-aliasing-module-attributes/95920/3
The correct way to implement is:
import module
from module import optimize, validate as check
--
https://mail.python.org/mailman3//lists/python-list.python.org
Thank you. I have used this link. I had difficulty finding it.
https://discuss.python.org/
--
https://mail.python.org/mailman3//lists/python-list.python.org
Thank you. I have posted this idea on https://discuss.python.org/c/ideas/6
I had difficulty trying to find that.
--
https://mail.python.org/mailman3//lists/python-list.python.org
Thanks, D'Arcy. I've done a fair amount of 2-to-3 migration in the past, but
there was a lot of stuff in that article ("six", for instance) that I hadn't
run across.
--
https://mail.python.org/mailman3//lists/python-list.python.org
Thanks. That appears to be exactly the thing I was looking for (vis-a-vis
collections).
--
https://mail.python.org/mailman3//lists/python-list.python.org
wrote:
>
>
> > On 17 Jun 2025, at 00:19, Omar Ahmed via Python-list <
> python-list@python.org> wrote:
> >
> > Hi all,
> > I would like to propose a potential addition to Python's `import` syntax
> that would improve clarity and ergonomics for cases wh
On Tue, Jun 17, 2025 at 8:19 AM Barry Scott wrote:
>
>
> > On 17 Jun 2025, at 00:19, Omar Ahmed via Python-list <
> python-list@python.org> wrote:
> >
> > Hi all,
> > I would like to propose a potential addition to Python's `import` syntax
> that
On 17/06/2025 00:19, Omar Ahmed via Python-list wrote:
Hi all,
I would like to propose a potential addition to Python's `import` syntax that
would improve clarity and ergonomics for cases where developers want both full
module access *and* a local alias to a specific attribute within
lman3//lists/python-list.python.org
Greetings. We (the group that I work with) have "inherited" some Python
scripts that were written years ago, using Python 2.
We're trying to upgrade the scripts so that they work in our current
environment:
OS: Ubuntu 24.04.2 LTS
$ python --version
consumption
Better reconnection handling via Dilation timeouts
pytest test suite conversion
Python 3.9 support dropped (good call in line with ecosystem trends)
sdist file renaming (PEP 625 compliance)
These seem like solid improvements for both the end-user experience and
contributors. Has anyone here
://mail.python.org/mailman3//lists/python-list.python.org
Being a user of that list i've also noticed that only recently. hope that
this list is good enough to take on all python questions. Are there any
other alternative lists? Thx
On Wed, 28 May 2025, 01:35 Alan Gauld via Python-list, <
python-list@python.org> wrote:
> I am the mo
ke 28.5.2025 klo 1.45 Thomas Passin (li...@tompassin.net) kirjoitti:
> On 5/27/2025 10:41 AM, Roland Mueller via Python-list wrote:
> > To get a list of files in a given directory one can use glob.glob and
>
> The OP had a different problem. He wanted to find a config file of
&g
Message received!
Hope you enjoyed your holiday...
On 28/05/25 12:00, Alan Gauld via Python-list wrote:
On 28/05/2025 00:32, Alan Gauld via Python-list wrote:
The archives are still there and the sign-up page seems to
work, but it doesn't recognise me. I tried signing up as
a new m
On 28/05/2025 00:32, Alan Gauld via Python-list wrote:
> The archives are still there and the sign-up page seems to
> work, but it doesn't recognise me. I tried signing up as
> a new member with a different address and that seems to work(ie no
> errors) but I still don;t see any
I am the moderator of the python tutor mailing list.
Or at least I was. It seems the tutor list has been deleted.
I came back from vacation to find that I can't access it.
Nobody told me anything in advance. I've tried emailing
postmaster but got no response.
I wonder if anyone here ha
he parts for the glob mask together
instead of plain '/'.
>
>
> ti 27.5.2025 klo 17.05 Peter J. Holzer (hjp-pyt...@hjp.at) kirjoitti:
>
>> On 2025-05-24 17:18:11 -0600, Mats Wichmann wrote:
>> > On 5/23/25 16:05, Rob Cliffe via Python-list wrote:
>> &g
s and add the resulting list of
files.
>>> tmp_files = []
>>> for dir in ['/tmp', '/var/tmp']:
... tmp_files += [f for f in glob(dir + '/*') if isfile(f) ]
ti 27.5.2025 klo 17.05 Peter J. Holzer (hjp-pyt...@hjp.at) kirjoitti:
> On 2025-05-
Here’s the second 3.14 beta.
https://www.python.org/downloads/release/python-3140b2/
This is a beta preview of Python 3.14
Python 3.14 is still in development. This release, 3.14.0b2, is the second
of four planned beta releases.
Beta release previews are intended to give the wider community
On Sun, 25 May 2025 at 10:05, Rob Cliffe via Python-list
wrote:
> Yes, but if I understand correctly, they all start from a single
> directory (and work downwards if required).
> My suggestion involved searching a *list* (possibly multiple lists) of
> directories.
for dir in dirs:
On 25/05/2025 00:18, Mats Wichmann wrote:
On 5/23/25 16:05, Rob Cliffe via Python-list wrote:
On 23/05/2025 18:55, Mats Wichmann wrote:
On 5/22/25 21:04, Rob Cliffe via Python-list wrote:
It occurs to me that it might be useful if Python provided a
function to search for a file with a
r it.
Thanks for all of the suggestions.
--
Michael F. Stemper
I refuse to believe that a corporation is a person until Texas executes one.
--
https://mail.python.org/mailman3//lists/python-list.python.org
re on this idea.
So, I use an environment variable because my config is shared between Python
and Java auto test frameworks. I think keeping the config adjacent to the
.py files is also workable because a Python program can know where it is:
from pathlib import Path
script_path = Path(__file__).re
On 23/05/2025 18:55, Mats Wichmann wrote:
On 5/22/25 21:04, Rob Cliffe via Python-list wrote:
It occurs to me that it might be useful if Python provided a function
to search for a file with a given name in various directories (much
as the import.import_lib function searches for a module in
but
> this is unnecessarily complicated for many applications - have the
> program look first on the command line for the config directory,
> then for an environmental variable, then in those likely places.
--
https://mail.python.org/mailman3//lists/python-list.python.org
It occurs to me that it might be useful if Python provided a function to
search for a file with a given name in various directories (much as the
import.import_lib function searches for a module in the directories in
sys.path).
This function would perhaps be best placed in the os.path or os
On 22/05/2025 23:45, Mats Wichmann wrote:
On 5/22/25 13:59, Michael F. Stemper via Python-list wrote:
I recently wrote a program to do some record-keeping for me. I found
myself hard-coding a bunch of different values into it. This didn't
seem right, so I made my first u
isn't running programs and it isn't fusing atoms, it's just bending space.
--
https://mail.python.org/mailman3//lists/python-list.python.org
ion in ways that
are difficult to accomplish using metaclasses and other complicated
mechanisms Python language provides to that end. Eg. you can
conditionally inherit from different superclasses (so, you can use
this approach as a factory that creates different classes), or you can
conditional
under the name
'Flag3: 4, __init__'.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On 19/05/2025 23:11, Thomas Passin via Python-list wrote:
On 5/19/2025 5:49 PM, Mats Wichmann via Python-list wrote:
On 5/19/25 09:51, Jonathan Gossage via Python-list wrote:
I have created a dynamic class using the type() function:
x = type('MyFlags', (), {'Flag1': 1, &
On 5/19/2025 5:49 PM, Mats Wichmann via Python-list wrote:
On 5/19/25 09:51, Jonathan Gossage via Python-list wrote:
I have created a dynamic class using the type() function:
x = type('MyFlags', (), {'Flag1': 1, 'Flag2': 2, 'Flag3: 4, '
'__init__
On 5/19/25 09:51, Jonathan Gossage via Python-list wrote:
I have created a dynamic class using the type() function:
x = type('MyFlags', (), {'Flag1': 1, 'Flag2': 2, 'Flag3: 4, ' '__init__' :
__init__})
The new class is there, and the cla
initializer.
--
Jonathan Gossage
--
https://mail.python.org/mailman/listinfo/python-list
Am 18.05.2025 22:16 schrieb Larry Martell via Python-list:
https://youtu.be/pqBqdNIPrbo?si=P2ukSXnDj3qy3HBJ
Awesome! Which release channels will be used? How can we pay?
--
https://mail.python.org/mailman/listinfo/python-list
On 5/18/25 15:16, Larry Martell wrote:
https://youtu.be/pqBqdNIPrbo?si=P2ukSXnDj3qy3HBJ
Get ready Guido:
"I'd like to thank the Academy ..."
--
https://mail.python.org/mailman/listinfo/python-list
On 5/18/25 08:39, Mike Dewhirst via Python-list wrote:
Apologies for top-posting. It's my phone's fault.Since no-one appears to have
responded, I'll stir up some aggro and offer my opinion based on ~45 years
experience with Microsoft.Uninstall python/idle etc completely and
https://youtu.be/pqBqdNIPrbo?si=P2ukSXnDj3qy3HBJ
--
https://mail.python.org/mailman/listinfo/python-list
Apologies for top-posting. It's my phone's fault.Since no-one appears to have
responded, I'll stir up some aggro and offer my opinion based on ~45 years
experience with Microsoft.Uninstall python/idle etc completely and download
from python.org instead. I would advise ignoring
Von: T N
Gesendet: Samstag, 17. Mai 2025 04:33
An: idle-...@python.org
Betreff: dont use C:\Windows as working directory when installed using
microsoft store
Hi,
ive installed python with IDLE using the microsoft store, but one big issue
with it
tk config files
somewhere.
i would aprichiate any help on that.
thanks a lot in advance,
Tim from Hamburg
--
https://mail.python.org/mailman/listinfo/python-list
. It reduces the admin work substantially, plus it's easy to
extend, so we can always tune them or add new ones.
Thanks,
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Experts (#1, May 14 2025)
>>> Python Projects, Coaching and Suppor
onnal programming map and filter list comprehension
expressions
* Add dict's | merge and |= update operators
* Reorganize sequences index sectionto make room
* Add with () group of context to open multiple files
A+
L.Pointal.
--
https://mail.python.org/mailman/listinfo/python-list
e can always tune them or add new ones.
>
> Thanks,
--
https://mail.python.org/mailman/listinfo/python-list
regards,
Schimon
On Wed, 14 May 2025 13:42:22 +0200
eGenix Team via Python-list wrote:
> *ANNOUNCING*
>
>
> eGenix Antispam Bot for Telegram
>
> Version 0.7.1
>
> A simple, yet effective bot implementation
> to address Telegram signup spam.
>
> This announce
1 - 100 of 3253 matches
Mail list logo