Re: Rock Paper Scissors Code Bug?

2025-12-08 Thread John Smith via Python-list
Thanks for the recommendations. I'm building a whole new version based on the old one, with simpler code and functions to find win stats. -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Rock Paper Scissors Code Bug?

2025-12-08 Thread John Smith via Python-list
Thanks for the tip. I'll do that here and in future games. -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Rock Paper Scissors Code Bug?

2025-12-08 Thread Jason Friedman via Python-list
input("Welcome to Rock, Paper, Scissors. To begin, choose Rock, Paper, or Scissors. ") if player_choice == ROCK: break if player_choice == PAPER: break if player_choice == SCISSORS: ... The advantage of this approach is misspellings generate compilation errors, which are easier to catch and fix. -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Rock Paper Scissors Code Bug?

2025-12-08 Thread via Python-list
Ah! Found it. I had an extra space in "Rock". Thanks for the help! -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Rock Paper Scissors Code Bug?

2025-12-08 Thread Chris Angelico via Python-list
On Tue, 9 Dec 2025 at 05:29, via Python-list wrote: > > I coded Rock, Paper, Scissors. I added the randomness, made it loop at the > user's request, added win code, no problems there. I changed some strings to > F-strings to practice using them, and now the first "elif&quo

Rock Paper Scissors Code Bug?

2025-12-08 Thread via Python-list
t;) print(f"Choice: {choice}") print(f"You played: {player_choice}") playagain = True while playagain == True: ask_repeat = input("Play again? Y/N ") if ask_repeat == "Y": print("Restarting... ") repeat = True playagain = False elif ask_repeat == "N": repeat = False playagain = False print("Goodbye.") else: playagain = True repeat = False print("Error. Input either Y or N. Capitalize and retry.") -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: A switch somewhere, or bug? CORRECTION

2025-12-07 Thread Michael Torrie via Python-list
On 12/7/25 3:03 AM, Em wrote: > So, is this a change from WIN10? Maybe. It could be a change in the pylauncher. Or a change in how Windows starts pylauncher. It could be a difference between the versino of Python Microsoft puts in the store vs the python.org package. It could be a change in

Re: A switch somewhere, or bug? CORRECTION

2025-12-07 Thread Michael Torrie via Python-list
in. > Irrespective of anything else that's going on, that's not my experience. > I just tried, and double-clicking a python script makes the directory > that I have open in Explorer the current directory. I've seen the same > not just with scripts but also with executa

Re: What is the tool used here?

2025-12-07 Thread Alan Gauld via Python-list
at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: What is the tool used here?

2025-12-07 Thread Grant Edwards via Python-list
ng posts via gmane So I use a custom hacked inews replacement that e-mails posts to this list instead of sending them via NNTP/gmane like it does for all of the more friendly lists. https://slrn.info/ https://github.com/GrantEdwards/hybrid-inews -- Grant -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: A switch somewhere, or bug? CORRECTION

2025-12-07 Thread Sibylle Koczian via Python-list
Hello, Am 07.12.2025 um 15:36 schrieb Em: -Original Message- From: Roel Schroeven Sent: Sunday, December 7, 2025 7:23 AM To: [email protected] Subject: Re: A switch somewhere, or bug? CORRECTION Op 7/12/2025 om 1:54 schreef Thomas Passin: As I explained in my last post, that&#

Re: A switch somewhere, or bug?

2025-12-06 Thread Pierre Fortin via Python-list
On Thu, 4 Dec 2025 11:06:21 -0500 Em wrote: >Two computers, both alike in dignity, in fair windows land... > >in Win10/Python 3.13 my program runs as well as can be expected. However, on >my new computer Win11/Python 3.14.1 there is a peculiarity. > >On the new machine, when I

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Chris Angelico via Python-list
On Sat, 6 Dec 2025 at 18:22, Michael Torrie wrote: > > On Sat, Dec 6, 2025, 00:04 Chris Angelico wrote: >> >> On Sat, 6 Dec 2025 at 15:52, Michael Torrie via Python-list >> wrote: >> > >> > On 12/5/25 6:36 PM, Chris Angelico via Python-list wrote: &

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Michael Torrie via Python-list
On Sat, Dec 6, 2025, 00:04 Chris Angelico wrote: > On Sat, 6 Dec 2025 at 15:52, Michael Torrie via Python-list > wrote: > > > > On 12/5/25 6:36 PM, Chris Angelico via Python-list wrote: > > > On Sat, 6 Dec 2025 at 12:33, Michael Torrie via Python-list > >

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Chris Angelico via Python-list
On Sat, 6 Dec 2025 at 15:52, Michael Torrie via Python-list wrote: > > On 12/5/25 6:36 PM, Chris Angelico via Python-list wrote: > > On Sat, 6 Dec 2025 at 12:33, Michael Torrie via Python-list > > wrote: > >> Starter = open("HLYlog.txt","w"); >

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Michael Torrie via Python-list
On 12/5/25 6:36 PM, Chris Angelico via Python-list wrote: > On Sat, 6 Dec 2025 at 12:33, Michael Torrie via Python-list > wrote: >> Starter = open("HLYlog.txt","w"); >> filepath = Starter.name > > Isn't that just... > > filepath = "H

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Chris Angelico via Python-list
On Sat, 6 Dec 2025 at 12:33, Michael Torrie via Python-list wrote: > Starter = open("HLYlog.txt","w"); > filepath = Starter.name Isn't that just... filepath = "HLYlog.txt" ? ChrisA -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Michael Torrie via Python-list
On 12/5/25 5:12 PM, Em wrote: > Ok, using "Open with Python" , the program fails on both computers. > Still, double-click the filename on the WIN10 computer and the program > works. > While, double-click the filename on the WIN11 computer and the program > fails. Here

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Michael Torrie via Python-list
bitrary directory. If you start it from idle, idle sets the working directory. If you double click the py file, the pylauncher sets the working directory. All could be and in fact are different. If you always want it to open that file in the same directory as the script, then you can use code such

Re: Are PyQt5 questions/issues accepted here?

2025-12-04 Thread Michael Torrie via Python-list
Qt's documentation is quite good. Here are the official python Qt docs on the subject of slots in Qt 6 (PySide2): https://doc.qt.io/qtforpython-6/tutorials/basictutorial/signals_and_slots.html In short you decorate them with @Slot(params) where params are a list of the Qt types your sl

Fwd: Re: A switch somewhere, or bug? CORRECTION

2025-12-04 Thread Alan Gauld via Python-list
On 04/12/2025 18:25, Em wrote: > in Win10/Python 3.13 my program runs as well as can be expected. However, on > my new computer Win11/Python 3.14.1 there is a peculiarity. > > On the new machine, when I click on the file name, it immediately dumps out. What exactly does "d

Re: A switch somewhere, or bug?

2025-12-04 Thread 'dn' via Python-list
incidents as the message says.. Footnote: Fifteen plus Fifteen is thirty. Sixteen and Sixteen is thirty too. -Original Message- From: dn via Python-list Sent: Thursday, December 4, 2025 1:30 PM To: [email protected] Subject: Re: A switch somewhere, or bug? On 05/12/2025 05:06, Em wrote

Re: A switch somewhere, or bug?

2025-12-04 Thread dn via Python-list
On 05/12/2025 05:06, Em wrote: Two computers, both alike in dignity, in fair windows land... in Win10/Python 3.13 my program runs as well as can be expected. However, on my new computer Win11/Python 3.14.1 there is a peculiarity. On the new machine, when I click on the file name, it

Re: Are PyQt5 questions/issues accepted here?

2025-12-03 Thread Sibylle Koczian via Python-list
I wonder nobody mentioned the dedicated PyQt mailing list: https://riverbankcomputing.com/support/lists Mainly PyQt6, but I don't think questions about older versions are forbidden. -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Are PyQt5 questions/issues accepted here?

2025-12-02 Thread Chris Angelico via Python-list
xpert on Qt). A forum dedicated to Qt/PyQt will have more experts on it. ChrisA -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Proposal: private keyword for import statements to hide module dependencies

2025-12-02 Thread Bjørnar Remmen via Python-list
Richard Damon wrote: > On 11/25/25 3:42 PM, bjotta via Python-list wrote: > > It seem like you are talking about classes and sub-classes. I was talking > > about dependencies in projects. > > The technique is currently defined only for class and sub-classes, but > coul

Re: Failing to install Python

2025-12-01 Thread dn via Python-list
On 01/12/2025 22:40, [email protected] wrote: I have installed Python on two Win10 computers over the last 20 years. Only after several spits and starts each time did it finally work. The new Win11 desktop is now running. I can't help but think there is an easier way to get it inst

Re: Proposal: private keyword for import statements to hide module dependencies

2025-11-30 Thread Bjørnar Remmen via Python-list
I agree that some of my reasoning was off and it does not directly with the issue of sub-dependencies. However, the Idea was more on how to hide it rather than the dependency issue itself. Anyways, I agree that an approach on name mangling might be more in line with what we have in python

Re: Proposal: private keyword for import statements to hide module dependencies

2025-11-25 Thread Michael Torrie via Python-list
On 11/25/25 1:42 PM, bjotta via Python-list wrote: > I want to be able to restrict / name mangle the usage. > To avoid this being possible. > > ''' > from library.math import np. > ''' Fascinating. I would never have thought to do an import like th

Re: Proposal: private keyword for import statements to hide module dependencies

2025-11-25 Thread bjotta via Python-list
I tried explaining it further down in the thread -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Proposal: private keyword for import statements to hide module dependencies

2025-11-25 Thread bjotta via Python-list
t;private" keyword. Any other suggestion to that part? -- https://mail.python.org/mailman3//lists/python-list.python.org

Proposal: private keyword for import statements to hide module dependencies

2025-11-21 Thread Bjørnar Remmen via Python-list
7;'' Internally in the file np is accesible, but when importing the file it is not accesible. Expected behaviour: import module.math module.math.np This raises an AttributeError from module.math import np raises an ImportError from module.math import calculate_mean Succeeds -- https://mail.python.org/mailman3//lists/python-list.python.org

Fwd: zipapp: add compression (method), compresslevel options from Zipfile

2025-11-17 Thread Mingye Wang via Python-list
sting zipapp.py. You can just run it with "python zipapp.py". I've tried using it to make zstd and stored archives. Tangential: the zip file format compresses each file separately, which reduces the potential for good compression compared to "solid" formats like .tar.gz. We

Re: Conda create with python version fails me

2025-11-17 Thread Martin Schöön via Python-list
Den 2025-11-14 skrev Stefan Ram : > Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= wrote or quoted: >>If I try to specify a python version I don't get a new environment. The >>error message I get is: >>"The following packages are missing from the target environment: >>

Re: Sending FDs over UNIX domain sockets

2025-11-15 Thread Grant Edwards via Python-list
On 2025-11-16, Pokemon Chw via Python-list wrote: > On Linux AF_UNIX + SOCK_STREAM sockets, there is a quirk in how the > kernel handles control messages with SCM_RIGHTS: > > To successfully pass file descriptors via SCM_RIGHTS, you must send > at least one byte of normal d

Re: zipapp: add compression (method), compresslevel options from Zipfile

2025-11-15 Thread Abdur-Rahmaan Janhangeer via Python-list
You have some demo code for it? Kind Regards, Abdur-Rahmaan Janhangeer about <https://compileralchemy.github.io/> | blog <https://compileralchemy.substack.com/> github <https://github.com/Abdur-RahmaanJ> Mauritius On Mon, 10 Nov 2025, 07:18 Mingye Wang via Python-list, < p

Re: Conda create with python version fails me

2025-11-14 Thread Martin Schöön via Python-list
Den 2025-11-13 skrev Loris Bennett : Hi Loris, Thanks for quick respons. > Martin Schöön writes: > >> >> I want to create a new environment using a specific python version >> rather than leaving that to conda. Cheat-sheets and online conda >> documentation tell me

Conda create with python version fails me

2025-11-13 Thread Martin Schöön via Python-list
About two years ago I moved from pip to conda. I have been happy with conda until yesterday. I want to create a new environment using a specific python version rather than leaving that to conda. Cheat-sheets and online conda documentation tell me to use: conda create -n python= like: conda

zipapp: add compression (method), compresslevel options from Zipfile

2025-11-09 Thread Mingye Wang via Python-list
Zipapp is meant to produce things that will be delivered to an end-user. In this way it should behave like most packaging tools and offer more "thorough" compression options, limited only by the version of the Python interpreter on the user's side (more specifically, their zipfi

Re: argsparse: allowing --version without mandatory options

2025-11-04 Thread Jonathan N. Little via Python-list
"print version" > > However, with the above, I still need to specify the mandatory argument, > even if I only want to see the version. > > I guess I'll just have to change > > nargs="+" > > to > > nargs="*" > > and check explicitly whether any arguments have been given. > > Seems odd to me though that there is not a standard way of implementing > '--version' which works like '--help' does. > > Cheers, > > Loris > -- Take care, Jonathan --- LITTLE WORKS STUDIO http://www.LittleWorksStudio.com -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Formatted Integer With Specified Number Of Digits

2025-10-26 Thread Michael Torrie via Python-list
or negative numbers the padding would have to be Fs instead of 0s. -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-22 Thread Michael Torrie via Python-list
On 10/22/25 7:14 PM, Chris Angelico via Python-list wrote: > And that's why it's so frustrating when someone bases their entire > argument on an AI's nonsense. If the OP had simply posted it as a > request, with no hallucinated claims, it would have been a > straight-fo

Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-22 Thread Chris Angelico via Python-list
On Thu, 23 Oct 2025 at 12:01, Michael Torrie via Python-list wrote: > > On 10/19/25 12:38 PM, Chris Angelico via Python-list wrote: > > The entire premise of your post was flat-out wrong. Your data was > > nothing but hallucinations, and there is nothing to discuss. I'

Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-22 Thread Michael Torrie via Python-list
On 10/19/25 12:38 PM, Chris Angelico via Python-list wrote: > The entire premise of your post was flat-out wrong. Your data was > nothing but hallucinations, and there is nothing to discuss. I'm not > even going to bother reading further, because every post you've > writt

Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-19 Thread Chris Angelico via Python-list
On Mon, 20 Oct 2025 at 02:01, wrote: > > Thanks again for your detailed reply — I really appreciate it. I have to > admit, I wasn’t 100% sure about my data, which is why I submitted it for > discussion before opening a bug report to the Python developers. > Don't. Don'

Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-19 Thread python
Thanks again for your detailed reply — I really appreciate it. I have to admit, I wasn’t 100% sure about my data, which is why I submitted it for discussion before opening a bug report to the Python developers. I alredy checked Unicode tables, I saw that the capital ß (U+1E9E) was already

Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-18 Thread Chris Angelico via Python-list
dopting it in 2017. The > relevant case mappings are clearly specified in the Unicode Character > Database (CaseFolding.txt / SpecialCasing.txt), so Unicode itself does > recognize this direct uppercase/lowercase relationship. > > The current Python behavior (mapping "ß"

Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-18 Thread python
specified in the Unicode Character Database (CaseFolding.txt / SpecialCasing.txt), so Unicode itself does recognize this direct uppercase/lowercase relationship. The current Python behavior (mapping "ß" → "SS") reflects older, legacy Unicode data — not the current standard. Language

Re: Slices by length

2025-10-18 Thread Rob Cliffe via Python-list
On 06/09/2025 17:21, MRAB wrote: On 2025-09-06 13: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. It would be more natural

Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-18 Thread Mashaal Al Hammdi via Python-list
Hello friends, Can I know what’s going on?! Please في سبت، 18 أكتوبر، 2025 في 7:11 ص، كتب Chris Angelico via Python-list < [email protected]>: > On Sat, 18 Oct 2025 at 13:44, wrote: > > > > Dear Python Developers, > > > > I would like to bring attenti

Re: Python 3.14.0 (final) is here!

2025-10-18 Thread Ed Leafe via Python-list
On Oct 7, 2025, at 13:14, Abdur-Rahmaan Janhangeer via Python-list wrote: > > Very sad ... At least as Steve Dower suggested even if we could get an > email from Discourse or something. I too will miss these announcements. I understand not having to post things to multiple pl

Python 3.14.0 (final) is here!

2025-10-18 Thread Hugo van Kemenade via Python-list
://discuss.python.org/t/python-3-14-0-final-is-here/104210 for the 3.14.0 release notes. Regards from a colourful autumnal Helsinki, Your release team, Hugo van Kemenade Ned Deily Steve Dower Łukasz Langa -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Python 3.14.0 (final) is here!

2025-10-18 Thread Karsten Hilbert via Python-list
Am Wed, Oct 08, 2025 at 10:51:42AM +0200 schrieb Jean-François Bachelet via Python-list: > at least a mailing list is way more frugal. and internet friendly. And above all, PUSH rather than PULL. Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.

Re: Slices by length

2025-10-18 Thread Rob Cliffe via Python-list
On 07/10/2025 20:37, Thomas Passin wrote: On 10/7/2025 2:49 PM, Rob Cliffe via Python-list wrote: On 06/09/2025 17:21, MRAB wrote: On 2025-09-06 13: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

Re: Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-17 Thread Chris Angelico via Python-list
On Sat, 18 Oct 2025 at 13:44, wrote: > > Dear Python Developers, > > I would like to bring attention to an inconsistency and legacy behavior > regarding the handling of the German sharp S characters in Python’s string > case conversion methods. > This isn't Python

Proposal to update Unicode handling for German sharp S (ß / ẞ) in Python’s case conversion methods

2025-10-17 Thread python
Dear Python Developers, I would like to bring attention to an inconsistency and legacy behavior regarding the handling of the German sharp S characters in Python’s string case conversion methods. Currently, Python’s .upper() method converts the lowercase sharp S (U+00DF, “ß”) to the uppercase

Re: Python 3.14.0 (final) is here!

2025-10-17 Thread Jean-François Bachelet via Python-list
Hello Python Team ^^) It's indeed VERY sad that you would kill these mailing list !  we are a lot NOT using hungry ressources stuff like discuss, discord, or others that require a web browser to read at least a mailing list is way more frugal. and internet friendly. Cheers, Jeff

Re: Slices by length

2025-10-08 Thread meowxiik via Python-list
> Which brings to mind a possible alternate syntax: s[x::n] This would AFAIK collide with the the x[a:b:c] syntax, which already means something, the c is the size of a step <https://docs.python.org/3/library/functions.html#slice> M On 8 October 2025 16:22:46 CEST, python-

Re: Python 3.14.0 (final) is here!

2025-10-07 Thread Abdur-Rahmaan Janhangeer via Python-list
Mauritius On Tue, Oct 7, 2025 at 8:06 PM Hugo van Kemenade via Python-list < [email protected]> wrote: > Note: we also announce CPython releases at > https://discuss.python.org/tag/release and https://blog.python.org, and > are planning on only announcing at those places

Re: Detailed documentation or specs for behavior of descriptors in attributes of metaclasses

2025-09-26 Thread Steve Jorgensen via Python-list
In case anyone stumbles upon this, here's my question and partial self-answer on Stack Overflow: https://stackoverflow.com/a/79765602/396373 -- https://mail.python.org/mailman3//lists/python-list.python.org

concurrent.interpreters: why syntax errors in exec() cause a SyntaxError instead of an InterpreterError?

2025-09-25 Thread a.mux--- via Python-list
Hi, I am testing the [concurrent.interpreters](https://docs.python.org/3.14/library/concurrent.interpreters.html) feature from Python **3.14rc3** (the latest current rc). The subinterpreter seems to behave in a surprising way when encountering syntax errors. For example, in the following code

Help Needed to Run Python.NET Demo Samples in C#

2025-09-23 Thread vitarag shah via Python-list
Website: https://www.azilen.com -- https://mail.python.org/mailman3//lists/python-list.python.org

Python 3.14.0rc3 is go! And release announcement news

2025-09-22 Thread Hugo van Kemenade via Python-list
Note: we also announce CPython releases at https://discuss.python.org/tag/release and https://blog.python.org, and are planning on only announcing at those places in the future, and not on this mailing list. Please see https://discuss.python.org/t/python-3-14-0rc3-is-go/103815 for the 3.14.0rc3

Re: Test message. Posted a question several days ago and don't see it.

2025-09-12 Thread Steve Jorgensen via Python-list
Well, that was the more important thing to do. :) -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Test message. Posted a question several days ago and don't see it.

2025-09-10 Thread dn via Python-list
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

Re: Drop into REPL when your program crashes.

2025-09-10 Thread Annada Behera via Python-list
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

Drop into REPL when your program crashes.

2025-09-10 Thread Annada Behera via Python-list
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

Detailed documentation or specs for behavior of descriptors in attributes of metaclasses

2025-09-10 Thread Steve Jorgensen via Python-list
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

Test message. Posted a question several days ago and don't see it.

2025-09-10 Thread Steve Jorgensen via Python-list
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

Re: Slices by length

2025-09-06 Thread dn via Python-list
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

Slices by length

2025-09-06 Thread Rob Cliffe via Python-list
(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

Re: Error installing matplotlib

2025-09-05 Thread Rob Cliffe via Python-list
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

Python Installation -- configure flags

2025-09-05 Thread Klaus Jantzen via Python-list
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

Re: Environments and Version Control (if not packaging and PyPI)

2025-09-04 Thread Left Right via Python-list
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

Environments and Version Control (if not packaging and PyPI)

2025-09-04 Thread dn via Python-list
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

Re: Image enhance

2025-09-03 Thread AM CR via Python-list
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. >

Re: Error installing matplotlib

2025-09-03 Thread Left Right via Python-list
"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

Re: Error installing matplotlib

2025-09-03 Thread Oscar Benjamin via Python-list
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, < > [email protected]> wrote: > >> >> >> On 03/09/2025 14:59, Mats Wic

Re: Error installing matplotlib

2025-09-03 Thread Rob Cliffe via Python-list
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: >

Re: Error installing matplotlib

2025-09-03 Thread Oscar Benjamin via Python-list
On Wed, 3 Sep 2025, 15:21 Rob Cliffe via Python-list, < [email protected]> 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

Re: Error installing matplotlib

2025-09-03 Thread Rob Cliffe via Python-list
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

Re: Error installing matplotlib

2025-09-03 Thread Rob Cliffe via Python-list
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 >

Re: Image enhance

2025-09-03 Thread Joel Goldstick via Python-list
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

Error installing matplotlib

2025-09-02 Thread Rob Cliffe via Python-list
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

Re: Access to return / exception context in finally block

2025-09-02 Thread marius.spix--- via Python-list
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

Re: Image enhance

2025-09-02 Thread amrodi9999--- via Python-list
Save restored image sharp.save("STC_restaurada.jpg") -- https://mail.python.org/mailman3//lists/python-list.python.org

Image enhance

2025-09-02 Thread amrodi9999--- via Python-list
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

Re: Access to return / exception context in finally block

2025-09-01 Thread Rob Cliffe via Python-list
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

Re: Access to return / exception context in finally block

2025-09-01 Thread Rob Cliffe via Python-list
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

Re: Access to return / exception context in finally block

2025-09-01 Thread marius.spix--- via Python-list
easier. What do you think? Best wishes Marius Spix -- https://mail.python.org/mailman3//lists/python-list.python.org

Re: Python documentary

2025-09-01 Thread Schimon Jehudah via Python-list
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

Re: Access to return / exception context in finally block

2025-09-01 Thread Left Right via Python-list
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

Re: Access to return / exception context in finally block

2025-08-31 Thread Rob Cliffe via Python-list
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

Access to return / exception context in finally block

2025-08-30 Thread marius.spix--- via Python-list
): 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

Re: Python documentary

2025-08-30 Thread Left Right via Python-list
> 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

Re: Python documentary

2025-08-29 Thread Tim Williams via Python-list
On Fri, Aug 29, 2025 at 3:37 PM Larry Martell via Python-list < [email protected]> 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

Re: Python documentary

2025-08-29 Thread dn via Python-list
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

Python documentary

2025-08-29 Thread Larry Martell via Python-list
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

Re: can you improve this text-only beginner copy program?

2025-08-28 Thread dn via Python-list
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).

Re: can you improve this text-only beginner copy program?

2025-08-28 Thread dn via Python-list
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

  1   2   3   4   5   6   7   8   9   10   >