initializer.
--
Jonathan Gossage
--
https://mail.python.org/mailman/listinfo/python-list
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
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 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, &
under the name
'Flag3: 4, __init__'.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
.Good luck.Mike --Unsigned mail from my phone
Original message ----From: T N via Python-list
Date: 17/5/25 12:54 (GMT+10:00) To:
python-list@python.org Subject: WG: dont use C:\Windows as working directory
when installed using
microsoft store V
https://youtu.be/pqBqdNIPrbo?si=P2ukSXnDj3qy3HBJ
--
https://mail.python.org/mailman/listinfo/python-list
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-
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 22/05/2025 20:59, Michael F. Stemper 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 use of configparser.ConfigParser().
Created the configuration file and everything
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
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
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
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 has any idea
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 modu
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
On 2025-05-23, Thomas Passin wrote:
>> Alternatively look at the PATH envronment variable, which
>> contains a list of directories separated by semicolons and which you can
>> access as os.environ['PATH'] .
>
> There is really no reason for a config file to be on the system
> path.
On Unix/Lin
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
Thanks for sharing the update, Meejah! Great to see the addition of the status
feedback API and improved Dilation handling, those changes should definitely
enhance usability and performance. Also appreciate the move to pytest and the
clearer packaging per PEP 625. Solid work!
--
https://mail.py
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 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
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
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 that module.
Currently, to get both behaviors, we typically write:
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
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
I honestly have no idea what's being measured, but here are some
numbers to compare this to, and then some explanation about async I/O
in general.
1. No I/O to a local disk on a modern controller should take
milliseconds. The time you are aiming for is below millisecond. That
is, writing a block t
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 asyncio.to_thread(os.sta
Given a class object (C), is it possible to *reliably* determine whether
the class was compiled with PEP 563 (from __future__ import annotations)
enabled?
Note that simply looking for the presence of C.__module__.annotations is
not really reliable. It will fail in the presence of any of these
co
Hi everyone,
I just read the release announcement for Magic Wormhole 0.19.0, and I wanted to
start a thread here to appreciate the work and open up discussion for anyone
using or interested in it.
Some exciting highlights:
New status feedback API, finally, some clean visibility into code consumpt
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
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 be removed
MY_BOOL
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'
and even 'a'*4096 is compiled a
Version 0.4.0 of distlib has recently been released on PyPI [1]. For newcomers,
distlib is a library of packaging functionality which is intended to be usable
as the basis for third-party packaging tools.
The main changes in this release are as follows:
* Add the ``interpret_parsed`` function t
functionality in the near future (plus a mild
case of 'I wanna code' [aka NIH] syndrome), push me to learn and implement this
myself.
Thanks in advance!
Cheers
Brian
--
https://mail.python.org/mailman/listinfo/python-list
I am not exactly sure what you mean, so I will guess.
Jinja may be what you're looking for. It's an important component of flask &
ansible, for example.
pyweave may also serve your purposes.
HTH
--
https://mail.python.org/mailman/listinfo/python-list
le to solve it myself.
Any thoughts about it?
Thanks!
--
https://mail.python.org/mailman/listinfo/python-list
ou're right... I was just, you know... "Async is so cool, let's just
async everything!"
>If it were a class, then you could make the individual methods be
> coroutines if desired and await those.
Thanks for your advise Ian!
--
https://mail.python.org/mailman/listinfo/python-list
a complete narcissistic
moron." -- H. L. Mencken.
--
https://mail.python.org/mailman/listinfo/python-list
ve now filtered news.bbs.geek.nz from my feed.
Will
--
"When we look around us, this is what we find,
The hope that springs eternal, springs right up your behind."
-- Ian Dury
--
https://mail.python.org/mailman/listinfo/python-list
On Friday, April 15, 2022 at 2:17:28 AM UTC+5:30, Andrew Hernandez wrote:
> that is not an error, its simply the python console intrepeter
how do I open this file
--
https://mail.python.org/mailman/listinfo/python-list
e???
Caddy Man
Good sense makes one slow to anger, and it is his glory tooverlook an offense.
Proverbs 19:11
--
https://mail.python.org/mailman/listinfo/python-list
ither not
running or you have a problem with the configuration.
On Tue, Aug 09, 2022 at 08:27:16AM -0700, Axy via Python-list wrote:
trying to connect to MYSQL it appears the error msg below:
InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306'
(111 Connec
; port number is wrong or mysql is not listening on 127.0.0.1.
>
>
> Axy
>
--
https://mail.python.org/mailman/listinfo/python-list
--
Daniel Ciprus .:|:.:|:.
CONSULTING ENGINEER.CUSTOMER DELIVERY Cisco Systems Inc.
dcip...@cisco.com
tel: +1-703
om [1]Mail for Windows
References
Visible links
1. https://go.microsoft.com/fwlink/?LinkId=550986
--
https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
--
Daniel Ciprus .:|:.:|:.
CONSULTING ENGINEER.CUS
how to resolve this module import error? I can provide files
and/or more details as well.
Thank you all for the help!
Take care,
Erik Brown
--
https://mail.python.org/mailman/listinfo/python-list
ror: expected an
indented block after 'if' statement on line 29
Process finished with exit code 1
Good sense makes one slow to anger, and it is his glory tooverlook an offense.
Proverbs 19:11
--
https://mail.python.org/mailman/listinfo/python-list
Isaiah 43:2
| | Virus-free.www.avg.com |
--
https://mail.python.org/mailman/listinfo/python-list
version says it expects ' first (to close the fstring)
then on a new line below it, it mentions the comma and )
I believe that is just showing you after ' it expects you to end the
print with ) as you have
or , to add additional arguments to print
--
https://mail.python.org/mailman/list
u: and when you pass
through the rivers, they will not sweep over you. When you walk through the
fire, you will not be burned: the flames will not set you ablaze."
Isaiah 43:2
On Tuesday, April 18, 2023 at 11:17:52 PM MDT, Kevin M. Wilson via
Python-list wrote:
print (f'
ot;
Isaiah 43:2
| | Virus-free.www.avg.com |
--
https://mail.python.org/mailman/listinfo/python-list
walk through the
fire, you will not be burned: the flames will not set you ablaze."
Isaiah 43:2
| | Virus-free.www.avg.com |
--
https://mail.python.org/mailman/listinfo/python-list
saiah 43:2
| | Virus-free.www.avg.com |
--
https://mail.python.org/mailman/listinfo/python-list
python.org/mailman/listinfo/python-list
of said code.
"When you pass through the waters, I will be with you: and when you pass
through the rivers, they will not sweep over you. When you walk through the
fire, you will not be burned: the flames will not set you ablaze."
Isaiah 43:2
--
https://mail.python.org/mailman/listinfo/python-list
5'))) |
"When you pass through the waters, I will be with you: and when you pass
through the rivers, they will not sweep over you. When you walk through the
fire, you will not be burned: the flames will not set you ablaze."
Isaiah 43:2
--
https://mail.python.org/mailman/listinfo/python-list
e."
Isaiah 43:2
On Thursday, May 25, 2023 at 05:55:06 PM MDT, Kevin M. Wilson via
Python-list wrote:
Ok, I'm not finding any info. on the int() for converting a str to an int
(that specifies a base parameter)?! The picture is of the code I've written...
And the
\site-packages\pipenv\patched\pip
Lib\site-packages\pipenv\utils\pip.py
Lib\site-packages\pipenv\utils\__pycache__\pip.cpython-310.pyc
PS C:\Users\Owner>
-=-=-
I've just run the installer -- python-3.10.11-amd64.exe -- as admin, in
"repair" mode! There is NO pip.exe under
On Thu, 8 Jun 2023 17:22:22 -0400, Thomas Passin
declaimed the following:
>On 6/8/2023 3:14 PM, Dennis Lee Bieber via Python-list wrote:
> C:\Users\Owner>
>> -=-=-
>> Windows PowerShell
>> Copyright (C) Microsoft Corporation. All rights reserved.
>>
>>
On Sat, 10 Jun 2023 11:32:53 -0500, Eryk Sun declaimed
the following:
>On 6/10/23, Thomas Passin via Python-list wrote:
>>
>> We can find pip.exe using good old-fashioned dir (we don't need any
>> new-fangled Powershell):
>>
>> C:\Users\tom>dir AppData
On 2023-06-20 02:15:00 +0900, Inada Naoki via Python-list wrote:
> stream.flush() doesn't mean final output.
> Try stream.close()
After close() the value isn't available any more:
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "co
rate decision?
hp
--
_ | Peter J. Holzer| Story must make more sense than reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
--
https://mail.python.org/mailman/listinfo/python-list
On 2023-08-30 11:32:02 +, c.buhtz--- via Python-list wrote:
> I do use "textwrap" package to wrap longer texts passages. Works well with
> English.
> But the source string used is translated via gettext before it is wrapped.
>
> Using languages like Japanese or Chi
On 2023-08-30 13:18:25 +, c.buhtz--- via Python-list wrote:
> Am 30.08.2023 14:07 schrieb Peter J. Holzer via Python-list:
> > another caveat: Japanese characters are usually double-width. So
> > (unless your line length is 130 characters for English) you would
> > want t
On 2023-08-31 21:32:04 +0100, Chris Green via Python-list wrote:
> What sort of exception should a class raise in __init__() when it
> can't find an appropriate set of data for the parameter passed in to
> the class instantiation?
>
> E.g. I have a database with some names and
)
The "problem" is that I've currently written some code that works but it uses
global variables ... and I don't like global variables. I assume there is a
better way to write this, but how?
= jem
--
https://mail.python.org/mailman/listinfo/python-list
On 3 Sep 2023, at 19:13, MRAB via Python-list wrote:
> You could use pass an anonymous function (a lambda) to re.sub:
Of course !! Thanks.
= jem
--
https://mail.python.org/mailman/listinfo/python-list
On 2023-09-03 18:10:29 +0200, Jan Erik Moström via Python-list wrote:
> I want to replace some text using a regex-pattern, but before creating
> replacement text I need to some file checking/copying etc. My code
> right now look something like this:
>
> def fix_stuff(m):
>
On 3 Sep 2023, at 18:10, Jan Erik Moström via Python-list wrote:
> I'm looking for some advice for how to write this in a clean way
Thanks for all the suggestion, I realize that I haven't written Python code in
a while. I should have remembered this myself !!! Thanks for remindi
n the
times. Is there a timeit-like function in Postgresql?
Thanks!
Albert-Jan
--
https://mail.python.org/mailman/listinfo/python-list
On 2023-09-15 17:42:06 +0200, Albert-Jan Roskam via Python-list wrote:
>This is more related to Postgresql than to Python, I hope this is ok.
>I want to measure Postgres queries N times, much like Python timeit
>(https://docs.python.org/3/library/timeit.html). I know abou
On 2023-09-15 21:48:37 +, rmlibre--- via Python-list wrote:
> I'd like to capture the output of `time.perf_counter_ns()` as an 8-byte
> timestamp.
>
> I'm aware that the docs provide an undefined start value for that clock.
> I'm going to assume that means it can
On Sep 15, 2023 19:45, "Peter J. Holzer via Python-list"
wrote:
On 2023-09-15 17:42:06 +0200, Albert-Jan Roskam via Python-list wrote:
> This is more related to Postgresql than to Python, I hope this is
ok.
> I want to measure Postgres queries N
On 2023-09-17 11:01:43 +0200, Albert-Jan Roskam via Python-list wrote:
>On Sep 15, 2023 19:45, "Peter J. Holzer via Python-list"
> wrote:
>
> On 2023-09-15 17:42:06 +0200, Albert-Jan Roskam via Python-list wrote:
> > This is more related to Postg
On 2023-09-15 14:15:23 +, c.buhtz--- via Python-list wrote:
> I tried to install it via "pipx install -e .[develop]". It's pyproject.toml
> has a bug: A missing dependency "dateutil". But "dateutil" is not available
> from PyPi for Python 3.11 (th
On 2023-09-18 18:56:35 +, c.buhtz--- via Python-list wrote:
> On 2023-09-18 10:16 "Peter J. Holzer via Python-list"
> wrote:
> > On 2023-09-15 14:15:23 +, c.buhtz--- via Python-list wrote:
> > > I tried to install it via "pipx install -e .[develop]"
On 2023-09-20 13:31:14 +, c.buhtz--- via Python-list wrote:
> Dear Peter,
>
> maybe we have a missunderstanding.
>
> Am 20.09.2023 14:43 schrieb Peter J. Holzer via Python-list:
> > > > > "dateutil" is not available from PyPi for Python 3.11
> >
rint Loop (REPL) is ready for you to type some python
statements. For instance:
>>> x = 2**3
>>> print(x)
8
>>>
--
Michael F. Stemper
Outside of a dog, a book is man's best friend.
Inside of a dog, it's too dark to read.
--
https://mail.python.org/mailman/listinfo/python-list
On 26/9/23 22:27, Abdelkhelk ashref salay eabakh via Python-list wrote:
Dear Python team,
This is my not first time using Python, I tried to launch Python and it showed
I'm no expert but
"Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit
(AMD6
d "python setup.py egg_info" failed with error code 1 in
c:\users\kuchipz\appdata\local\temp\pip-build-gc4ekm\pip
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, 27 September 2023 at 21:32:53 UTC+2, Mats Wichmann wrote:
> On 9/27/23 05:17, Zuri Shaddai Kuchipudi via Python-list wrote:
> > hello everyone this the error that im getting while trying to install and
> > upgrade pip on what is the solution for it?
> >
On 2023-09-27 20:32:25 -, Jon Ribbens via Python-list wrote:
> On 2023-09-27, Larry Martell wrote:
> > On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via
> > Python-list wrote:
> >> On 2023-09-27, Larry Martell wrote:
> >> > lrwxrwxrwx 1 larrymartell l
On Wednesday, 27 September 2023 at 23:33:02 UTC+2, Chris Angelico wrote:
> On Thu, 28 Sept 2023 at 07:27, Mats Wichmann via Python-list
> wrote:
> >
> > Upgrading to Python 3 is the best answer... except when it isn't. If
> > you want to convert a small project i
On 2023-10-02 19:44:12 +0300, אורי via Python-list wrote:
> I have an issue since about 5 months now. Python 3.12.0 venv not working
> with psycopg2 on Windows. I created 2 issues on GitHub but they were
> closed. I checked today with the new Python release but it's still not
> wo
I can help you
On Mon, 9 Oct 2023, 11:15 pm Thri sowmya.G via Python-list, <
python-list@python.org> wrote:
>
>
>The problem is how many times I have uninstalled the python version but
>always it is showing the same version after the installation of new
>ver
ped, I
find this hard to believe.
--
Michael F. Stemper
Outside of a dog, a book is man's best friend.
Inside of a dog, it's too dark to read.
--
https://mail.python.org/mailman/listinfo/python-list
an be
proven correct or incorrect. But, there are a lot more that cannot.
--
Michael F. Stemper
Outside of a dog, a book is man's best friend.
Inside of a dog, it's too dark to read.
--
https://mail.python.org/mailman/listinfo/python-list
On 25/10/2023 05.45, o1bigtenor wrote:
On Tue, Oct 24, 2023 at 8:35 PM Chris Angelico via Python-list
wrote:
3. Catch the failure before you commit and push. Unit tests are great for this.
Where might I find such please.
You don't "find" unit tests; you write them. A un
On 2023-11-14 00:11:30 +0200, Dom Grigonis via Python-list wrote:
> Benchmarks:
> test1 = [False] * 100 + [True] * 2
> test2 = [True] * 100 + [False] * 2
>
> TIMER.repeat([
> lambda: xor(test1), # 0.0168
> lambda: xor(test2), # 0.0172
> lambda:
reality.
|_|_) ||
| | | h...@hjp.at |-- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
--
https://mail.python.org/mailman/listinfo/python-list
On 2023-11-16 11:34:16 +1300, Rimu Atkinson via Python-list wrote:
> > > Why don't you use re.findall?
> > >
> > > re.findall(r'\b[0-9]{2,7}-[0-9]{2}-[0-9]{2}\b', txt)
> >
> > I think I can see what you did there but it won't make
On 2023-11-17 07:48:41 -0500, Thomas Passin via Python-list wrote:
> On 11/17/2023 6:17 AM, Peter J. Holzer via Python-list wrote:
> > Oh, and Python (just like Perl) allows you to embed whitespace and
> > comments into Regexps, which helps readability a lot if you have to
> &g
azoni and
Marc-Andre Lemburg
--
https://mail.python.org/mailman/listinfo/python-list
_Introducing Python_
--
Michael F. Stemper
This sentence no verb.
--
https://mail.python.org/mailman/listinfo/python-list
On 2023-11-25 08:32:24 -0600, Michael F. Stemper via Python-list wrote:
> On 24/11/2023 21.45, avi.e.gr...@gmail.com wrote:
> > Of course, for serious work, some might suggest avoiding constructs like a
> > list of lists and switch to using modules and data structures [...]
>
uch as
when to use radio-buttons and when check-boxes. I can't tell you if the
gtk, qt, or wx people offer something similar...
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list
Good luck,
Bill
--
https://mail.python.org/mailman/listinfo/python-list
;...what does the "r" signify?
If it's 'read', why can't I use the 'a' for append?
KMW
"The only way to have experience is by having the experience"!
--
https://mail.python.org/mailman/listinfo/python-list
e we would get from OP would tell us what sort
of help might be most suitable :-)
Karsten
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
--
https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
' are Welcome!
KMW
John 1:4 "In him was life; and the life was the light of men."
--
https://mail.python.org/mailman/listinfo/python-list
5401 - 5500 of 5793 matches
Mail list logo