On 6/5/2024 12:33 AM, dn via Python-list wrote:
On 31/05/24 14:26, HenHanna via Python-list wrote:
On 5/30/2024 2:18 PM, dn wrote:
On 31/05/24 08:03, HenHanna via Python-list wrote:
Given a text file of a novel (JoyceUlysses.txt) ...
could someone give me a pretty fast (and simple) Python
Your release team,
Thomas Wouters @thomas <https://discuss.python.org/u/thomas>
Łukasz Langa @ambv <https://discuss.python.org/u/ambv>
Ned Deily @nad <https://discuss.python.org/u/nad>
Steve Dower @steve.dower <https://discuss.python.org/u/steve.dower>
--
https://mail.python.org/mailman/listinfo/python-list
<https://discuss.python.org/u/thomas>
Łukasz Langa @ambv <https://discuss.python.org/u/ambv>
Ned Deily @nad <https://discuss.python.org/u/nad>
Steve Dower @steve.dower <https://discuss.python.org/u/steve.dower>
--
https://mail.python.org/mailman/listinfo/python-list
On 6/5/24 05:10, Thomas Passin via Python-list wrote:
Of course, we see this lack of clarity all the time in questions to the
list. I often wonder how these askers can possibly come up with
acceptable code if they don't realize they don't truly know what it's
supposed to do
On Sat, Jun 8, 2024 at 10:39 AM Mats Wichmann via Python-list <
python-list@python.org> wrote:
> On 6/5/24 05:10, Thomas Passin via Python-list wrote:
>
> > Of course, we see this lack of clarity all the time in questions to the
> > list. I often wonder how these askers c
On 6/8/2024 11:54 AM, Larry Martell via Python-list wrote:
On Sat, Jun 8, 2024 at 10:39 AM Mats Wichmann via Python-list <
python-list@python.org> wrote:
On 6/5/24 05:10, Thomas Passin via Python-list wrote:
Of course, we see this lack of clarity all the time in questions to the
li
it on some project they consider
similar. That can be a good thing but often a mess as you wrote the code to do
things in a specific way for a specific purpose ...
-Original Message-----
From: Python-list On
Behalf Of Thomas Passin via Python-list
Sent: Saturday, June 8, 2024 1:10 PM
To: p
ot;>>>" prompt appears on the SECOND
line.
(This blank line is because the IDLE prints the blank value returned by
"return ''" and adds a newline to it, as it does when printing the value
of any expression.)
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
good thing but often a mess as you wrote the code to do
things in a specific way for a specific purpose ...
-Original Message-----
From: Python-list On
Behalf Of Thomas Passin via Python-list
Sent: Saturday, June 8, 2024 1:10 PM
To: python-list@python.org
Subject: Re: From JoyceUlysses.tx
provide such functionality.
-Original Message-
From: Python-list On
Behalf Of Larry Martell via Python-list
Sent: Saturday, June 8, 2024 11:54 AM
To: Mats Wichmann
Cc: python-list@python.org
Subject: Re: From JoyceUlysses.txt -- words occurring exactly once
On Sat, Jun 8, 2024 at 10
On 2024-06-08, Larry Martell via Python-list wrote:
> The original question struck me as homework or an interview question for a
> junior position. But having no clear requirements or specifications is good
> training for the real world where that is often the case. When you question
&g
On 08/06/2024 20:18, Rob Cliffe via Python-list wrote:
> OK, here is the advanced version:
> import os
> class _cls(object):
> def __repr__(self):
> os.system('cls')
> return ''
> cls = _cls()
>
> Now when you type
> cls
&g
would
be trivial, perhaps leveraging the above.
-Original Message-
From: Python-list On
Behalf Of HenHanna via Python-list
Sent: Sunday, June 9, 2024 5:20 PM
To: python-list@python.org
Subject: in Python? -- Chunk -- (ChunkC '(a a b b b)), ==> ((a 2) (b 3))
Chunk, ChunkC -- nice si
would ask questions more clearly and perhaps explain
what language they are showing us code from and so on.
Life is too short to waste.
-Original Message-
From: Python-list On
Behalf Of HenHanna via Python-list
Sent: Sunday, June 9, 2024 5:20 PM
To: python-list@python.org
Subject: in Python
ult properly, since it is an iterator, you need to
either be calling it iteratively, or do something like:
Result = list(chunk(something))
To force it to run to completion.
-Original Message-
From: Python-list On
Behalf Of HenHanna via Python-list
Sent: Sunday, June 9, 2024 10:37 P
##
Program output:
['aaa', 'bb', '', 'aa']
[('a', 3), ('b', 2), ('c', 4), ('a', 2)]
Rob Cliffe
On 09/06/2024 22:20, HenHanna via Python-list wrote:
Chunk, ChunkC -- nice simple way(s) to write these in Python?
(Ch
#x27;, 'c', 'c'], ['singleton']]
>>> chunkC([1, 2, 2, 'c', 'c', 'c', 'singleton'])
[[1, 1], [2, 2], ['c', 3], ['singleton', 1]]
# COMMENTS
The current version has flaws I have not bothered correcting. Jus
n, see
> https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
> InsecurePlatformWarning,
Any clues?
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 12 Jun 2024 at 21:32, marc nicole via Python-list
wrote:
>
> I am trying to install numpy library on Python 2.7.15 in PyCharm but the
> error message I get is:
>
> You can upgrade to a newer version of Python to solve this.
The answer is right there in the error m
...
-Original Message-
From: Python-list On
Behalf Of Gordinator via Python-list
Sent: Wednesday, June 12, 2024 10:19 AM
To: python-list@python.org
Subject: Re: Couldn't install numpy on Python 2.7
On 12/06/2024 12:30, marc nicole wrote:
> I am trying to install numpy library o
think of all the PC's that may effectively be discarded as they may not
even be usable if donated.
We live in a rapidly developing age and hence one with regularly and
irregularly scheduled rounds of obsolescence.
When is Python 4 coming?
-Original Message-
From: Python-list On
Beha
On Thu, 13 Jun 2024 at 03:41, AVI GROSS via Python-list
wrote:
>
> Change is hard even when it may be necessary.
>
> The argument often is about whether some things are necessary or not.
>
> Python made a decision but clearly not a unanimous one.
What decision? To not release a
On 6/12/2024 1:59 PM, Chris Angelico via Python-list wrote:
On Thu, 13 Jun 2024 at 03:41, AVI GROSS via Python-list
wrote:
Change is hard even when it may be necessary.
The argument often is about whether some things are necessary or not.
Python made a decision but clearly not a unanimous
On Thu, 13 Jun 2024 at 06:55, Thomas Passin via Python-list
wrote:
> The project cannot move to a Python-3 compatible version because Jython
> 3.xx doesn't exist and may never exist. The saving grace is that my
> project doesn't have to use packages like numpy, scipy, and so
, continuing with python 2 will likely cause ever
more such headaches if you want the latest and greatest of things like
numpy.
-Original Message-
From: Python-list On
Behalf Of Chris Angelico via Python-list
Sent: Wednesday, June 12, 2024 2:00 PM
To: python-list@python.org
Subject: Re
reaking change. It definitely
smelled like FUD.
Maybe your jokes just aren't funny.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 12 Jun 2024 at 22:38, AVI GROSS via Python-list
wrote:
>
> The discussion though was about a specific OP asking if they can fix their
> problem. One solution being suggested is to fix a deeper problem and simply
> make their code work with a recent version of python 3.
Th
On Thu, 13 Jun 2024 at 07:57, Oscar Benjamin via Python-list
wrote:
> They are seeing a warning that explicitly says "You can upgrade to a
> newer version of Python to solve this". I don't know whether that SSL
> warning is directly connected to pip not finding any vers
On Wed, 12 Jun 2024 at 23:11, Chris Angelico via Python-list
wrote:
>
> On Thu, 13 Jun 2024 at 07:57, Oscar Benjamin via Python-list
> wrote:
> > They are seeing a warning that explicitly says "You can upgrade to a
> > newer version of Python to solve this"
set up a local server
You should also be able to download a .tar.gz from PyPI and use pip
to install that. Although you'll have to track down the dependencies
yourself in that case.
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, 13 Jun 2024 at 08:46, Oscar Benjamin via Python-list
wrote:
> I don't know much about SSL and related networking things especially
> on Windows. I would be surprised if pip on old Python can't install
> from current PyPI though. I imagine that something strange has
&g
On Wed, 12 Jun 2024 at 23:52, Greg Ewing via Python-list
wrote:
> On 13/06/24 10:09 am, Chris Angelico wrote:
> > So if anyone
> > actually does need to use pip with Python 2.7, they probably need to
> > set up a local server
>
> You should also be able to download
anyone interested in keeping them
up to date. You as a user, take your chances.
-Original Message-----
From: Python-list On
Behalf Of Chris Angelico via Python-list
Sent: Wednesday, June 12, 2024 5:52 PM
To: python-list@python.org
Subject: Re: Couldn't install numpy on Python 2.7
On Thu, 13
#x27;s another incompatible change just around the corner.
Do you realise how insulting you are being to the developers of Python
by these implications?
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
, or just a speculation in a
discussion.
Either way, I am taking any further discussion along these lines offline and
will not continue here.
-Original Message-
From: Python-list On
Behalf Of Chris Angelico via Python-list
Sent: Wednesday, June 12, 2024 7:23 PM
To: python-list@python.org
herwise, expect responses like this.
I *detest* the attitude that you can make vague disparaging comments
and then hide behind claims that you had no idea how damaging you were
being.
ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
ure
Yair
--
בברכה,
יאיר אשל כהנסקי
מתכנת וטכנאי מילים
https://www.inspect-element.net/YouAreHere/#/start
--
https://mail.python.org/mailman/listinfo/python-list
s no sense! :-)
How can one not say something that one isn't aware of saying?
--
Chris Green
·
--
https://mail.python.org/mailman/listinfo/python-list
of the world in which we live. As such, we can cast
aside childish remnants from the dawn of our civilization.
-- NotSanguine on SoylentNews, after Eugen Weber in /The Western Tradition/
--
https://mail.python.org/mailman/listinfo/python-list
> On 13 Jun 2024, at 11:01, Yair Eshel via Python-list
> wrote:
>
> I read this is a good place to give some suggestions for features in
> python.
Best place these days is to raise an idea on https://discuss.python.org/
Beware that this idea has come up in the past and was r
Hey, everyone!
I believe the original question has been answered, and tempers seem to be flaring in sub-threads, so let's call this
thread done and move on to other interesting topics.
Thank you for your support!
--
~Ethan~
Moderator
--
https://mail.python.org/mailman/listinfo/python-list
ires a `with` extension.
--
Dieter
--
https://mail.python.org/mailman/listinfo/python-list
pport, and doing stuff like merging an `except`
with a `wtih` is bound to introduce some weird corner case, complicating
its semantics.
Cheers,
Cameron Simpson
--
https://mail.python.org/mailman/listinfo/python-list
merging an `except`
> with a `wtih` is bound to introduce some weird corner case, complicating
> its semantics.
>
> Cheers,
> Cameron Simpson
>
--
https://mail.python.org/mailman/listinfo/python-list
onymous, even wilder.
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, 15 Jun 2024 at 08:32, dn via Python-list wrote:
> These mailing-lists all run under the Python Code of Conduct.
>
The newsgroup, however, is not. Which means that anyone who posts on
the newsgroup is subject to no such restrictions - and that might
explain the, shall we say,
eference. I should respect that.
Plenty of people have reasons to post anonymously, even to a list like
this one. Just assume they've got their reasons and move on.
--
https://mail.python.org/mailman/listinfo/python-list
-
https://mail.python.org/mailman/listinfo/python-list
.org
--
https://mail.python.org/mailman/listinfo/python-list
seems the discussions with people
in the email list are more useful to me.
-Original Message-
From: Python-list On
Behalf Of Marco Moock via Python-list
Sent: Saturday, June 15, 2024 2:03 AM
To: python-list@python.org
Subject: Re: Anonymous email users
On 15.06.2024 um 10:30 Uhr dn wrote
AVI GROSS via Python-list schreef op 17/06/2024 om 17:03:
I simply am thinking that people who do not allow me to easily reply to them
directly, should be ignored by me and not get my cooperation that way.
FWIW, personally I (mostly) don't see the point of replying to people
personally. To
o far
Traceback (most recent call last):
File "C:\TEST*.PY", line 8, in
SetClipboardData(CF_UNICODETEXT, "0")
pywintypes.error: (0, 'SetClipboardData', 'No error message is available')
Can anyone shed light on this?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 2024-06-17, Roel Schroeven via Python-list wrote:
> FWIW, personally I (mostly) don't see the point of replying to people
> personally. To me a public mailing list is much like any public forum,
> where my expectation is that conversations happen in public. To me it
> a
h the group and I would not have received some chances to
learn if I could not ask questions in private that clearly did not fit the
purpose of the group.
So, I am outa this conversation IN PUBLIC. LOL!
-Original Message-----
From: Python-list On
Behalf Of Grant Edwards via Python-list
Sent:
On 6/17/2024 9:30 PM, MRAB via Python-list wrote:
On 2024-06-17 20:27, Rob Cliffe via Python-list wrote:
Recently I acquired a new laptop running WIndows 11; my previous one
uses WIndows 10. I encountered a strange problem:
I am using the win32clipboard backage (part of pywin32), and when I
On Mon, Jun 17, 2024 at 8:36 PM MRAB via Python-list
wrote:
> On 2024-06-17 20:27, Rob Cliffe via Python-list wrote:
>
> > SetClipboardData(CF_UNICODETEXT, "0")
> > CloseClipboard()
win32clipboard.SetClipboardData() first tries to covert the second
argument as an int
(win32clipboard.CF_UNICODETEXT,
hMem)
# Now the system owns the global memory.
except:
kernel32.GlobalFree(hMem)
raise
--
https://mail.python.org/mailman/listinfo/python-list
On 6/17/24 17:51, dn via Python-list wrote:
+1
The "public" part is not to embarrass posters, but recognition that
there are likely other people 'out there' (or arriving in-future if they
care to read the archives) experiencing a similar problem. (hence need
for descr
On 2024-06-18, Mats Wichmann via Python-list wrote:
> On 6/17/24 17:51, dn via Python-list wrote:
>
>> +1
>>
>> The "public" part is not to embarrass posters, but recognition that
>> there are likely other people 'out there' (or arrivi
the shell command above except the last column:
> 2024-06-18T19:28:56-0400
>
> Any help will be appreciated.
datetime.now(ZoneInfo("America/New_York")).isoformat()
--
https://mail.python.org/mailman/listinfo/python-list
rns 'ascii',
but it's clearly not attempting to display the bytes as ASCII (or
cp1252, or ISO-8859-1). How is it deciding on some sort of almost-but-
not-quite UTF-8 decoding?
I am using Python 2.7.18 on a Windows 10 system. If there's any other
relevant information I should provide please let me know.
Many thanks,
Rayner
--
https://mail.python.org/mailman/listinfo/python-list
On Sat, 22 Jun 2024 at 03:28, Rayner Lucas via Python-list
wrote:
> I'm curious about something I've encountered while updating a very old
> Tk app (originally written in Python 1, but I've ported it to Python 2
> as a first step towards getting it running on modern
is question is specific to NAO environment but in general how to go
> > about this task? what is a most common algorithm used in this case? Do
> > I have to also get the side of the object in order to know where
> > exactly the arms should be placed?
> > ___
> > 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
t appropriately (and my curiosity is at least partly satisfied).
This has given me a much better understanding of what I need to do in
order to migrate to Python 3 and add proper support for non-ASCII
characters, so I'm very grateful for your help!
Thanks,
Rayner
--
https://mail.python.org/mailman/listinfo/python-list
the side of the object in order to know where
exactly the arms should be placed?
--
https://mail.python.org/mailman/listinfo/python-list
tails of character encodings in
Python! I'm not sure why it doesn't give the same error on Windows, but
at least now I know where the root of the issue is.
I am now much better informed about how to migrate the code I'm working
on, so I am very grateful for your help.
Thanks,
Rayner
--
https://mail.python.org/mailman/listinfo/python-list
ot easy to create
a new one either. And even if I did, you can't even trust e-mail
providers not to give your address out to spammers.
The only function e-mail addresses serve now is to positively identify
the sender of a Usenet posting so he can be targeted for harassment,
lawsuits, or worse.
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, 24 Jun 2024 at 08:20, Rayner Lucas via Python-list
wrote:
>
> In article ,
> ros...@gmail.com says...
> >
> > If you switch to a Linux system, it should work correctly, and you'll
> > be able to migrate the rest of the way onto Python 3. Once you ach
On Mon, 24 Jun 2024 at 10:18, MRAB via Python-list
wrote:
> Tkinter in recent versions of Python can handle astral characters, at
> least back to Python 3.8, the oldest I have on my Windows PC.
Good to know, thanks! I was hoping that would be the case, but I don't
have a Windows syst
o unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>
--
https://mail.python.org/mailman/listinfo/python-list
> On 23 Jun 2024, at 06:58, Sebastian Wells via Python-list
> wrote:
>
> The spammers won the spam wars, so even if you have someone's real
> e-mail address, that's no guarantee that you can contact them. You
> certainly wouldn't be able to contact me at my
On 6/24/2024 5:51 AM, Barry Scott via Python-list wrote:
On 23 Jun 2024, at 06:58, Sebastian Wells via Python-list
wrote:
The spammers won the spam wars, so even if you have someone's real
e-mail address, that's no guarantee that you can contact them. You
certainly wouldn
Marc,
Several people have supplied feedback on whether your request is a good fit for
here. Ultimately it is up to the owner/moderator. In particular, your request
to the Tutor List may not fit the purpose and be a bit complex and to the main
Python List also outside some common usage whether
On Tue, 25 Jun 2024 at 08:31, dn via Python-list wrote:
> Python mailing-lists are covered by the Code of Conduct and monitored by
> ListAdmins. Thus, there are controls which limit the impact which
> advertisers and others with non-pythonic aims might otherwise exert!
>
So long
On 2024-06-24, Barry Scott via Python-list wrote:
>> On 23 Jun 2024, at 06:58, Sebastian Wells via Python-list
>> wrote:
>>
>> The spammers won the spam wars, so even if you have someone's real
>> e-mail address, that's no guarantee that you can contact
On Tue, 25 Jun 2024 at 11:41, Grant Edwards via Python-list
wrote:
> I've been using the same e-mail address for about 20 years. I've use
> that e-mail address with probably close to 100 retailers, charities,
> open-source projects, media sites, and various other organization
red them and they are on topic and not easily visible
as having committed some kind of sin. And as I use many email services, I
still find a high rate of false negatives everywhere.
It would not surprise me if a phrase like "not SPAM" gets this message
dumped into /dev/null
-Ori
on.org -- against proprietary attachments
--
https://mail.python.org/mailman/listinfo/python-list
ne.io .
--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, 26 Jun 2024 at 03:40, Anton Shepelev via Python-list
wrote:
>
> Chris Angelico to dn:
>
> > > Python mailing-lists are covered by the Code of Conduct
> > > and monitored by ListAdmins. Thus, there are controls
> > > which limit the impact which a
out a compatible .whl file with Python 2.7 and Windows?
--
https://mail.python.org/mailman/listinfo/python-list
their*
bits on the old version, and the combinations become progressively
harder to make work.
--
https://mail.python.org/mailman/listinfo/python-list
tion contributions to the Python
Software Foundation.
Regards from *scorchingly* hot Amsterdam (hey, we get good weather too!),
Your release team,
Thomas Wouters
Łukasz Langa
Ned Deily
Steve Dower
--
Thomas Wouters
--
https://mail.python.org/mailman/listinfo/python-list
unctions to different
instances of MyClass. It is in the context of a database app where I build
Getters for database data and pass one Getter per instance.
Thanks for hints
Ulrich
--
Ulrich Goebel
--
https://mail.python.org/mailman/listinfo/python-list
On 6/28/24 10:08, Ulrich Goebel via Python-list wrote:
By the way: in my usecase I want to pass different functions to different
instances of MyClass. It is in the context of a database app where I build
Getters for database data and pass one Getter per instance.
If I understood what you
On 6/28/2024 12:08 PM, Ulrich Goebel via Python-list wrote:
Hi,
a class can have methods, and it can have attributes, which can hold a
function. Both is well known, of course.
My question: Is there any difference?
The code snipped shows that both do what they should do. But __dict__ includes
essed in this way, it becomes (typically) a method.
--
https://mail.python.org/mailman/listinfo/python-list
Duesseldorf: HRB 46611
https://www.egenix.com/company/contact/
https://www.malemburg.com/
--
https://mail.python.org/mailman/listinfo/python-list
hahe via Python-list
wrote:
>
> On Thu, Jul 4, 2024 at 5:22 AM inhahe wrote:
>
> >
> >
> > On Thu, Jul 4, 2024 at 5:14 AM Daniel via Python-list <
> > python-list@python.org> wrote:
> >
> >>
> >> In your wisdom, would python be a good
modify the last attempt to open the file twice, which would
work, but seems like a kludge (subject to race condition, inefficient).
Is there a better / more Pythonic solution?
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
On 2024-07-06 at 11:49:06 +0100,
Rob Cliffe via Python-list wrote:
> Is there a better / more Pythonic solution?
https://docs.python.org/3/library/fileinput.html
At least this attempts to abstract the problem of iterating over a file
(or multiple files) into a library routine. I've u
On 06/07/2024 11:49, Rob Cliffe via Python-list wrote:
> If the file does not exist I want to take appropriate action, e.g.
> print an error message and abort the program.
> I might write it like this:
>
> try:
> with open(FileName) as f:
> for ln in f:
On Sat, 6 Jul 2024 at 11:55, Rob Cliffe via Python-list
wrote:
>
> Consider this scenario (which I ran into in real life):
> I want to open a text file and do a lot of processing on the lines
> of that file.
> If the file does not exist I want to take appropriate action,
On 7/6/2024 6:49 AM, Rob Cliffe via Python-list wrote:
Consider this scenario (which I ran into in real life):
I want to open a text file and do a lot of processing on the lines
of that file.
If the file does not exist I want to take appropriate action, e.g.
print an error message
print(f"File {FileName} not found:")
sys.exit()
Now the "process" function has been factored out and can be well
documented as to what it is doing on each line, and this code can be
documented as running process on each line of the file.
On 7/6/24 6:49 AM, Rob Cliffe vi
pen()` call returns a file object _which can be used as
a context manager_. It is separate from the `with` itself.
--
https://mail.python.org/mailman/listinfo/python-list
hon.org/mailman/listinfo/python-list
-
https://mail.python.org/mailman/listinfo/python-list
t work (trying to access the file after "with f"
raises the same
ValueError: I/O operation on closed file.
I'm using Python 3.11.5.
Best wishes
Rob Cliffe
--
https://mail.python.org/mailman/listinfo/python-list
the run:
% python3 p.py
line: here are
line: some lines of text
--
https://mail.python.org/mailman/listinfo/python-list
4601 - 4700 of 5792 matches
Mail list logo