Re: Rock Paper Scissors Code Bug?

2025-12-08 Thread Thomas Passin
On 12/8/2025 8:14 PM, Dan Sommers wrote: On 2025-12-08 at 18:57:34 -0500, Thomas Passin wrote: On 12/8/2025 6:16 PM, MRAB wrote: On 08/12/2025 21:18, Thomas Passin wrote: [...] There's another way of determining who won. Give each of the choices a value, such as:     OPTION_V

Re: Rock Paper Scissors Code Bug?

2025-12-08 Thread Thomas Passin
On 12/8/2025 6:16 PM, MRAB wrote: On 08/12/2025 21:18, Thomas Passin wrote: On 12/8/2025 2:49 PM, John Smith via Python-list wrote: Thanks for the tip. I'll do that here and in future games. In addition to using constants to parameterize the strings, the whole game can be made simple

Re: Rock Paper Scissors Code Bug?

2025-12-08 Thread Thomas Passin
On 12/8/2025 2:49 PM, John Smith via Python-list wrote: Thanks for the tip. I'll do that here and in future games. In addition to using constants to parameterize the strings, the whole game can be made simpler and easier to change when you realize that the if/else block has a regular construc

Re: What is the tool used here?

2025-12-07 Thread Thomas Passin
On 12/7/2025 3:37 PM, Em wrote: -Original Message- From: Roel Schroeven Sent: Sunday, December 7, 2025 12:29 PM To: [email protected] Subject: Re: What is the tool used here? Op 7/12/2025 om 17:25 schreef Em: I see >, >>, and >>>, attached at the beginning of lines in messages.

Re: A switch somewhere, or bug? CORRECTION

2025-12-07 Thread Thomas Passin
On 12/7/2025 3:37 PM, Em wrote: -Original Message- From: Roel Schroeven Sent: Sunday, December 7, 2025 12:26 PM To: [email protected] Subject: Re: A switch somewhere, or bug? CORRECTION Op 7/12/2025 om 15:46 schreef Thomas Passin: On 12/7/2025 7:22 AM, Roel Schroeven wrote

Re: A switch somewhere, or bug? CORRECTION

2025-12-07 Thread Thomas Passin
On 12/7/2025 7:22 AM, Roel Schroeven wrote: Op 7/12/2025 om 1:54 schreef Thomas Passin: As I explained in my last post, that's because in Windows 11 when double-clicking, the working directory is the system's Windows directory, not the one your program is in. Irrespective of any

Re: A switch somewhere, or bug? CORRECTION

2025-12-06 Thread Thomas Passin
atter what working directory is in effect. 4.Create a shortcut for your .py file on the desktop. Then open the Properties dialog for the shortcut. In the "Shortcut" tab you can put the desired working directory. Now when you double click the shortcut, it will open in the right direc

Re: A switch somewhere, or bug? CORRECTION

2025-12-06 Thread Thomas Passin
On 12/6/2025 2:51 PM, Em wrote: The confusing part here is that no one has indicated whether or not the statement fails in any of the six ways to run this program except me. Am I the only one that as the problem? No. I created the program with the suggested printout of the working directory

Re: A switch somewhere, or bug? CORRECTION

2025-12-06 Thread Thomas Passin
On 12/6/2025 2:22 AM, Michael Torrie via Python-list 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: On Sat, 6 Dec 2025 at 12:33, Michael Torrie via Python-l

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Thomas Passin
On 12/5/2025 10:33 PM, MRAB wrote: On 06/12/2025 00:52, Thomas Passin wrote: On 12/5/2025 7: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 f

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Thomas Passin
ually getting run. This suggestion will make a start at finding out what's going on. -Original Message- From: Thomas Passin Sent: Friday, December 5, 2025 4:34 PM To: [email protected] Subject: Re: A switch somewhere, or bug? CORRECTION On 12/5/2025 3:03 PM, Em wrote:

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Thomas Passin
On 12/5/2025 3:03 PM, Em wrote: Alright, Alright, Alright... Alright. These responses push much more sophisticated explanations than the question asked. This involves only one line of code that creates an empty text file. No other code is involved or needed. Before responding, please run this

Re: A switch somewhere, or bug? CORRECTION

2025-12-04 Thread Thomas Passin
indows 11, you can change file associations in Settings/default apps. You could write a batch file that launches the file on the command line with Python, then stays around after the program ends. Then make that batch file the default app for .py files. -Original Message- From: Tho

Re: Are PyQt5 questions/issues accepted here?

2025-12-02 Thread Thomas Passin
On 12/2/2025 5:03 PM, Rich Shepard wrote: On Tue, 2 Dec 2025, Thomas Passin wrote: Why not? Nothing very complicated, please. But you should be learning PyQt6, not v5. There's not a huge difference but go with v6 since almost it's getting all the new development. Thomas, Th

Re: Are PyQt5 questions/issues accepted here?

2025-12-02 Thread Thomas Passin
On 12/2/2025 3:27 PM, Rich Shepard wrote: I'm learning PyQt5 and will have questions now and then when I can't find answers in Fitzpatrick's book or in a web search. There are several web fora for Qt and PyQt support but I much prefer maillists where threads are pushed to me and I don't need t

Re: Failing to install Python

2025-12-02 Thread Thomas Passin
On 12/2/2025 2:38 PM, Mats Wichmann wrote: On 12/1/25 02: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

[RELEASE] Python 3.13.10 is now available!

2025-12-02 Thread Thomas Wouters
Python 3.13.10 is now available: https://www.python.org/downloads/release/python-31310/ Python 3.13.10 is the tenth maintenance release of 3.13, containing around 300 bugfixes, build improvements and documentation changes since 3.13.9. Enjoy the new release! -- https://mail.python.org/mailma

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

2025-11-25 Thread Thomas Passin
On 11/25/2025 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. e..g I create a library that has some dependencies (numpy here) Inside the library there is a file importing numpy for example. ''' im

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

2025-11-22 Thread Thomas Passin
On 11/21/2025 8:03 PM, Richard Damon wrote: One thought that came to mind as perhaps a way more in line with how other parts of python work, is to extend the “name mangling” aspect of __ to this sort of context. (Just __ at the beginning, not both before and after). In class members these beco

[RELEASE] Python 3.13.9 is now available

2025-10-18 Thread Thomas Wouters
Python 3.13.9 is now available. https://www.python.org/downloads/release/python-3139/ 3.13.9 is an expedited release containing a fix for one specific regression in Python 3.13.8: • gh-139783 : Fix `inspect.getsourcelines` for the case when a d

Re: Slices by length

2025-10-18 Thread Thomas Passin
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 int and x may be an int, a variable, or a (po

[RELEASE] Python 3.12.12, 3.11.14, 3.10.19 and 3.9.24 are now available!

2025-10-17 Thread Thomas Wouters
Old-timer Release Party We couldn’t just let Hugo have fun with 3.14.0, so here are new security releases of the venerated Python versions, 3.12 through 3.9! Security content in these releases XML-related • gh-139312 : Upgraded bundled libexpat

[RELEASE] Python 3.13.8 is now available.

2025-10-17 Thread Thomas Wouters
Python 3.13.8 is now available (but 3.14.0 probably deserves more attention ;p) https://www.python.org/downloads/release/python-3138/ This is the eighth maintenance release of Python 3.13 Python 3.13 is the newest previous major release of the Python programming language, and it contains many

Re: Image enhance

2025-09-02 Thread Thomas Passin
On 9/2/2025 11:29 AM, 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:\python27\python.exe d:\temp\teste.py But even though it runs, it

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

2025-08-27 Thread Thomas Passin
On 8/27/2025 1:45 PM, Stefan Ram wrote: Ethan Carter wrote or quoted: You're right. There's no written statement. The exercise was suggested by the teacher while in class. It was something like ``write a program that copies text files by getting source and destination via the command-line.''

Re: Assignment of global variables in a script.

2025-06-30 Thread Thomas Passin
On 6/30/2025 11:53 PM, Popov, Dmitry Yu via Python-list wrote: 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

[RELEASE] Python 3.13.5 is now available (yes, really...)

2025-06-11 Thread Thomas Wouters
releases Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation. Regards from hey, it’s us again, your release team, Tho

Python 3.13.4, 3.12.11, 3.11.13, 3.10.18 and 3.9.23 are now available

2025-06-03 Thread Thomas Wouters
available/94367#p-252840-enjoy-the-new-releases-9>Enjoy the new releases Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Softw

Re: Searching for a file

2025-05-27 Thread Thomas Passin
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 known name that could be in one of several locations. os.path.isfile from os.path import i

Re: Best practice for config files?

2025-05-22 Thread Thomas Passin
On 5/22/2025 7:09 PM, Rob Cliffe via Python-list wrote: 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'

Re: Dynamic classes

2025-05-19 Thread Thomas Passin via Python-list
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__' : __init__}) The new class is there, and the c

Re: backslash in triple quoted string

2025-05-13 Thread Thomas Passin via Python-list
On 5/8/2025 2:05 AM, Left Right via Python-list wrote: Also, it appears that the change linked above is a lie: https://docs.python.org/3/reference/lexical_analysis.html#grammar-token-python-grammar-longstringitem According to the grammar, any character can follow backslash in a valid Python pro

Re: Pip installs to unexpected place

2025-04-19 Thread Thomas Passin via Python-list
On 4/19/2025 4:56 AM, Peter J. Holzer via Python-list wrote: On 2025-04-18 13:08:36 -0400, Thomas Passin via Python-list wrote: On 4/18/2025 11:38 AM, Peter J. Holzer via Python-list wrote: On 2025-04-18 13:24:28 +1200, Greg Ewing via Python-list wrote: On 18/04/25 9:41 am, Mats Wichmann

Re: Pip installs to unexpected place

2025-04-18 Thread Thomas Passin via Python-list
On 4/18/2025 11:38 AM, Peter J. Holzer via Python-list wrote: On 2025-04-18 13:24:28 +1200, Greg Ewing via Python-list wrote: On 18/04/25 9:41 am, Mats Wichmann wrote: There's just not a really great answer to this. Seems to me a system-installed application shouldn't be looking in the user's

Re: Pip installs to unexpected place

2025-04-17 Thread Thomas Passin via Python-list
On 4/17/2025 4:58 AM, Roel Schroeven via Python-list wrote: Op 15/04/2025 om 20:31 schreef Mats Wichmann via Python-list: To be clear: you do not have to activate a virtualenv to use *Python* from it. If you just call the python by the path it's in, it figures everything out (and sets some vari

Re: Pip installs to unexpected place

2025-04-16 Thread Thomas Passin via Python-list
On 4/15/2025 5:38 PM, rbowman via Python-list wrote: On Tue, 15 Apr 2025 14:12:19 -0400, Thomas Passin wrote: On Linux, at least, it's standard for pip to install into the user's site-packages location if it's not invoked with admin privileges - even without --user. Pip will

Re: Pip installs to unexpected place

2025-04-15 Thread Thomas Passin via Python-list
On 4/15/2025 3:41 PM, dn via Python-list wrote: Various responses have been provided but the OP has not yet replied on- list (as verified by Archive). Is this an error with the list-processor or have some posts been sent to one person only (using Reply instead of ReplyList)? There are always

Re: Pip installs to unexpected place

2025-04-15 Thread Thomas Passin via Python-list
On 4/15/2025 12:43 PM, Friedrich Romstedt via Python-list wrote: Am Mo., 14. Apr. 2025 um 01:14 Uhr schrieb Jonathan Gossage via Python-list : I am using *Python 3.13* in a virtual environment under *Ubuntu Linux 24.04* . [...] Instead, it was installed into the site-packages directory in

Re: Pip installs to unexpected place

2025-04-14 Thread Thomas Passin via Python-list
On 4/14/2025 6:20 PM, Keith Thompson via Python-list wrote: Thomas Passin writes: [...] To activate a venv, you have to source its activate script, which is in the venv. First you have to mark it as executable. Then you source it - source ~/venv/gf4/bin/activate [...] No, you don't ha

Re: Pip installs to unexpected place

2025-04-14 Thread Thomas Passin via Python-list
On 4/14/2025 6:20 PM, Keith Thompson via Python-list wrote: Thomas Passin writes: [...] To activate a venv, you have to source its activate script, which is in the venv. First you have to mark it as executable. Then you source it - source ~/venv/gf4/bin/activate [...] No, you don't ha

Re: Pip installs to unexpected place

2025-04-14 Thread Thomas Passin via Python-list
fore it will find the system's or user's. You know the activation has been successful because the prompt changes to show you. The activation applies to the terminal session in which you activated the venv. On Sun, Apr 13, 2025 at 10:11 PM Thomas Passin <mailto:[email protected]>

Re: "Getting 'This app can’t run on your PC' (Access Denied) error when running Python or checking version in CMD on Windows 11"

2025-03-09 Thread Thomas Passin via Python-list
On 3/9/2025 3:16 PM, Gilmeh Serda via Python-list wrote: On Sat, 8 Mar 2025 15:59:51 +0530, Praveen Kumar wrote: "C:\Users\Bharath\AppData\Local\Programs\Python\Python313\python.exe" Is that an approved location for executables? Yes, that's where a python.org install normally goes. If you a

Re: "Getting 'This app can’t run on your PC' (Access Denied) error when running Python or checking version in CMD on Windows 11"

2025-03-09 Thread Thomas Passin via Python-list
On 3/8/2025 10:47 PM, Praveen Kumar wrote: Hi Thomas and team, It's worked In non-admin privileges after put the file in path at the first on environmental path variables, but with admin privileges it doesn't work though. Showing same error, as I mentioned earlier. If the path ha

Re: "Getting 'This app can’t run on your PC' (Access Denied) error when running Python or checking version in CMD on Windows 11"

2025-03-08 Thread Thomas Passin via Python-list
On 3/8/2025 5:29 AM, Praveen Kumar via Python-list wrote: Hi Python community and members, I hope this email finds you well, I want you to be assisted in resolving this following issue. kindly look at the below concern, """I’m running into an error where I get a 'This app can’t run on your PC'

Re: Book recommendation? For getting up to date

2025-02-16 Thread Thomas Passin via Python-list
On 2/16/2025 4:00 PM, Jan Erik Moström via Python-list wrote: On 16 Feb 2025, at 20:59, dn via Python-list wrote: When stop to think about it, this is quite a request: don't give me what I do know, do give me what I don't know! 😜 That said, you are correct: the bulk of new publications seem

[RELEASE] Python 3.13.2 and 3.12.9 now available!

2025-02-04 Thread Thomas Wouters via Python-list
eers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation. Regards from your team, Thomas Wouters Ned Deily Steve Dower Łukasz Langa -- https://mail.python.or

Re: Strategies for avoiding having to use --break-system-packages with pip

2025-01-14 Thread Thomas Passin via Python-list
On 1/14/2025 6:32 AM, Chris Green via Python-list wrote: I have a (relatively) clean Debian 12 installation running on my two workhorse systems, a desktop server at home and my laptop that travels around with me. I moved from Xubuntu to Debian on both these systems a few months ago. I ran Xubun

Re: Complete working version of cython Queue example?

2025-01-13 Thread Thomas Passin via Python-list
On 1/13/2025 11:09 AM, Henry S. Thompson via Python-list wrote: I've spent several days trying to get this example [1] working, using Python3.11 and Cython 3.0.11 of Debian. I've copied the example files as carefully as I can, renamed some to avoid a name clash with the queue.py library, but the

Re: Using pipx for packages as opposed to applications

2025-01-13 Thread Thomas Passin via Python-list
On 1/12/2025 7:11 AM, Chris Green via Python-list wrote: Stefan Ram wrote: Chris Green wrote or quoted: E.g. I want to install and use pksheet but, as it's not available from the Debian repositories, I'll have to install it from PyPi. I can't dig up any "pksheet" on PyPI. So, you got to

Re: subprocess.Popen does not launch audacity

2025-01-10 Thread Thomas Passin via Python-list
On 1/10/2025 4:00 PM, Tim Johnson via Python-list wrote: On 1/10/25 11:32, MRAB via Python-list wrote: ,,, snipped Below is the pertinent code:    Popen(choice, stdout=PIPE, stderr=PIPE,     stdin=PIPE, close_fds=True) My guess is my argument list is either insufficient or

Re: No module name mutagen

2024-12-31 Thread Thomas Passin via Python-list
On 12/31/2024 7:00 PM, Tim Johnson via Python-list wrote: Please let me grumble for a minute : I've been using python since before 1. 5, when I could email Guido van Rossum directly with questions and on  at least one occasion we swapped stories about our cats. I put six kids though college wr

Re: How to go about describing my software with a component diagram?

2024-12-24 Thread Thomas Passin via Python-list
On 12/24/2024 3:42 PM, marc nicole via Python-list wrote: it is here https://i.sstatic.net/ykk5Wd0w.png This diagram does not make much sense to me: 1. What is the purpose of the diagram and who is it intended for? 2. A module and an algorithm are different kinds of things, yet they are conne

Re: How to go about describing my software with a component diagram?

2024-12-24 Thread Thomas Passin via Python-list
On 12/24/2024 4:08 PM, marc nicole via Python-list wrote: The full python package (pypi) being represented as the outermost frame here including the 4 sub-frames) Le mar. 24 déc. 2024 à 22:05, marc nicole a écrit : I want to convey the idea that main.py (main algorithm) imports 3 modules (V,

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

2024-12-03 Thread Thomas Wouters via Python-list
Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation. Regards from your tireless, tireless release team, Thomas Wouters Ned Deily Steve Dower Pablo Galindo Salgado Łukasz Langa -- https://mail.python.org/mailman/listinfo/python-list

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

2024-11-08 Thread Thomas Passin via Python-list
On 11/8/2024 2:09 PM, dn via Python-list wrote: On 8/11/24 14:40, Mild Shock via Python-list wrote: Well you can use your Browser, since JavaScript understand post and pre increment: Question: are we talking Python or JavaScript? So we have x ++ equals in Python: Trying to find a word-for

Re: How to check whether audio bytes contain empty noise or actual voice/signal?

2024-10-26 Thread Thomas Passin via Python-list
On 10/25/2024 12:25 PM, marc nicole via Python-list wrote: Hello Python fellows, I hope this question is not very far from the main topic of this list, but I have a hard time finding a way to check whether audio data samples are containing empty noise or actual significant voice/noise. I am usi

Re: Correct syntax for pathological re.search()

2024-10-12 Thread Thomas Passin via Python-list
On 10/11/2024 8:37 PM, MRAB via Python-list wrote: On 2024-10-11 22:13, AVI GROSS via Python-list wrote: Is there some utility function out there that can be called to show what the regular expression you typed in will look like by the time it is ready to be used? Obviously, life is not that

Re: Correct syntax for pathological re.search()

2024-10-12 Thread Thomas Passin via Python-list
On 10/12/2024 6:59 AM, Peter J. Holzer via Python-list wrote: On 2024-10-11 17:13:07 -0400, AVI GROSS via Python-list wrote: Is there some utility function out there that can be called to show what the regular expression you typed in will look like by the time it is ready to be used? I assume

[RELEASE] Python 3.13.0 (final) released

2024-10-07 Thread Thomas Wouters via Python-list
Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation <https://www.python.org/psf-landing/>. Choo-choo from the release train, Your release team, Thomas Wouters Ned Deily Steve Dower Łukasz Langa -- https://mail.python.org/mailman/listinfo/python-list

Re: Best Practice Virtual Environment

2024-10-05 Thread Thomas Passin via Python-list
On 10/5/2024 4:27 PM, Ulrich Goebel via Python-list wrote: Hi, I learned to use virtual environments where ever possible, and I learned to pip install the required packages there. That works quite nice at home. Now I come to deploy a Python script on a debian linux server, making it usable fo

[RELEASE] Python 3.13.0rc3 and 3.12.7 released.

2024-10-01 Thread Thomas Wouters via Python-list
to the Python Software Foundation. Regards from a positively *melting* Menlo Park for some reason <https://social.coop/@Yhg1s/113051321976759729>this time, Your release team, Thomas Wouters Łukasz Langa Ned Deily Steve Dower -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Thomas Passin via Python-list
On 9/30/2024 11:30 AM, Barry via Python-list wrote: On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list wrote: import polars as pl pl.read_json("file.json") This is not going to work unless the computer has a lot more the 60GiB of RAM. As later suggested a streaming par

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Thomas Passin via Python-list
On 9/30/2024 1:00 PM, Chris Angelico via Python-list wrote: On Tue, 1 Oct 2024 at 02:20, Thomas Passin via Python-list wrote: On 9/30/2024 11:30 AM, Barry via Python-list wrote: On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list wrote: import polars as pl pl.read_json

Re: Help with Streaming and Chunk Processing for Large JSON Data (60 GB) from Kenna API

2024-09-30 Thread Thomas Passin via Python-list
On 9/30/2024 11:30 AM, Barry via Python-list wrote: On 30 Sep 2024, at 06:52, Abdur-Rahmaan Janhangeer via Python-list wrote: import polars as pl pl.read_json("file.json") This is not going to work unless the computer has a lot more the 60GiB of RAM. As later suggested a streaming par

Re: Python 3.8 or later on Debian?

2024-09-18 Thread Thomas Passin via Python-list
On 9/18/2024 10:49 AM, Ulrich Goebel via Python-list wrote: Hi, Debian Linux seems to love Python 3.7 - that is shown by apt-get list, and it's installed on my Debian Server. But I need at least Python 3.8 Is there a repository which I can give to apt to get Python 3.8 or later? Or do I real

Re: Sanitise user input for a script

2024-08-30 Thread Thomas Passin via Python-list
On 8/30/2024 3:18 PM, Simon Connah via Python-list wrote: I need to write a script that will take some user input (supplied on a website) and then execute a Python script on a host via SSH. I'm curious what the best options are for protecting against malicious input in much the smae way as you

Re: Script stops running with no error

2024-08-28 Thread Thomas Passin via Python-list
On 8/28/2024 8:07 PM, dn via Python-list wrote: On 29/08/24 10:32, Thomas Passin via Python-list wrote: On 8/28/2024 5:09 PM, Daniel via Python-list wrote: As you all have seen on my intro post, I am in a project using Python (which I'm learning as I go) using the wikimedia API to pull

Re: Script stops running with no error

2024-08-28 Thread Thomas Passin via Python-list
On 8/28/2024 5:09 PM, Daniel via Python-list wrote: As you all have seen on my intro post, I am in a project using Python (which I'm learning as I go) using the wikimedia API to pull data from wiktionary.org. I want to parse the json and output, for now, just the definition of the word. Wiktiona

[RELEASE] Python 3.12.5 released

2024-08-07 Thread Thomas Wouters via Python-list
Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation. Your release team, Thomas Wouters Łukasz Langa Ned Deily Steve Dower -- Thomas Wouters -- https://mail.python.org/mailman/listinfo/python-list

Re: Installation of Slixfeed with pip fails

2024-08-03 Thread Thomas Passin via Python-list
On 8/3/2024 2:49 PM, Barry Scott via Python-list wrote: On 30 Jul 2024, at 18:36, Schimon Jehudah via Python-list wrote: Greetings, to one and all! My name is Schimon, and I am the developer of a news chat bot for the XMPP network, called Slixfeed. I have recently added support for OMEMO

[RELEASE] Python 3.13.0 release candidate 1 released

2024-08-01 Thread Thomas Wouters via Python-list
this time.) - New deprecations <https://docs.python.org/3.13/whatsnew/3.13.html#deprecated>, most of which are scheduled for removal from Python 3.15 or 3.16. (Hey, *fellow core developer,* if a feature you find important is missing from this list, let Thomas know .) For more

Re: Predicting an object over an pretrained model is not working

2024-07-30 Thread Thomas Passin via Python-list
tand what those function calls are returning. It's documented somewhere, right? And you really do need to know the probabilities of the competing images because otherwise you won't know how confident you can be that the identification is a strong one. Le mar. 30 juil. 202

Re: Predicting an object over an pretrained model is not working

2024-07-30 Thread Thomas Passin via Python-list
On 7/30/2024 2:18 PM, marc nicole via Python-list wrote: Hello all, I want to predict an object by given as input an image and want to have my model be able to predict the label. I have trained a model using tensorflow based on annotated database where the target object to predict was added to t

Re: Issue with pip Installation on My Laptop

2024-07-26 Thread Thomas Passin via Python-list
On 7/26/2024 7:25 AM, Lizna Shah via Python-list wrote: OSError: [WinError 225] Operation did not complete successfully because the file contains a virus or potentially unwanted software That part of the error message tells you the story. Windows thinks some file in the install has been corru

[RELEASE] Python 3.13.0 beta 4 released.

2024-07-18 Thread Thomas Wouters via Python-list
tml#deprecated>, most of which are scheduled for removal from Python 3.15 or 3.16. (Hey, *fellow core developer,* if a feature you find important is missing from this list, let Thomas know .) For more details on the changes to Python 3.13, see What’s new in Python 3.13 <https:/

Re: Best use of "open" context manager

2024-07-06 Thread Thomas Passin via Python-list
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 and

Re: Difference method vs attribut = function

2024-06-29 Thread Thomas Passin via Python-list
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

[RELEASE] Python 3.13.0 beta 3 released.

2024-06-27 Thread Thomas Wouters via Python-list
l#id9>. (Some removals present in alpha 1 were reverted in alpha 2, as the removals were deemed too disruptive at this time.) - New deprecations <https://docs.python.org/3.13/whatsnew/3.13.html#deprecated>, most of which are scheduled for removal from Python 3.15 or 3.16. (Hey,

Re: Anonymous email users

2024-06-24 Thread Thomas Passin via Python-list
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't be able to conta

Re: win32clipboard writing to clipboard on Windows 11

2024-06-17 Thread Thomas Passin via Python-list
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 use

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Thomas Passin via Python-list
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

Re: From JoyceUlysses.txt -- words occurring exactly once

2024-06-08 Thread Thomas Passin via Python-list
On 6/8/2024 2:46 PM, [email protected] wrote: Agreed, Thomas. As someone who has spent lots of time writing code OR requirements of various levels or having to deal with the bugs afterwards, there can be a huge disconnect between the people trying to decide what to do and the people

Re: From JoyceUlysses.txt -- words occurring exactly once

2024-06-08 Thread Thomas Passin via Python-list
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 < [email protected]> 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

[RELEASE] Python 3.12.4 released

2024-06-06 Thread Thomas Wouters via Python-list
y volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation. Regards from still quite sunny Sunnyvale, Your release team, Thomas Wouters @thomas

[RELEASE] Python 3.13.0 beta 2 released.

2024-06-06 Thread Thomas Wouters via Python-list
New deprecations <https://docs.python.org/3.13/whatsnew/3.13.html#deprecated>, most of which are scheduled for removal from Python 3.15 or 3.16. (Hey, *fellow core developer,* if a feature you find important is missing from this list, let Thomas know .) For more details on the changes to P

Re: From JoyceUlysses.txt -- words occurring exactly once

2024-06-06 Thread Thomas Passin via Python-list
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 pr

Re: From JoyceUlysses.txt -- words occurring exactly once

2024-06-01 Thread Thomas Passin via Python-list
On 6/1/2024 4:04 AM, Peter J. Holzer via Python-list wrote: On 2024-05-30 19:26:37 -0700, HenHanna via Python-list wrote: hard to decide what to do with hyphens and apostrophes (I'd, he's, can't, haven't, A's and B's) Especially since the same character is us

Re: From JoyceUlysses.txt -- words occurring exactly once

2024-05-31 Thread Thomas Passin via Python-list
On 5/30/2024 4:03 PM, HenHanna via Python-list wrote: Given a text file of a novel (JoyceUlysses.txt) ... could someone give me a pretty fast (and simple) Python program that'd give me a list of all words occurring exactly once?   -- Also, a list of words occurring once, twice o

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Thomas Passin via Python-list
On 5/29/2024 10:59 AM, MRAB via Python-list wrote: On 2024-05-29 15:32, Thomas Passin via Python-list wrote: On 5/29/2024 8:55 AM, Kevin M. Wilson wrote: Please recall, I said the format for the email failed to retain the proper indents. I'll attach a picture of the code! Purpos

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Thomas Passin via Python-list
ll not be burned: the flames will not set you ablaze." *Isaiah 43:2 * On Wednesday, May 29, 2024 at 06:19:56 AM MDT, Thomas Passin via Python-list wrote: On 5/29/2024 3:14 AM, Chris Angelico via Python-list wrote: > On Wed, 29 May 2024 at 16:03, Cameron Simpson via Python-list

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Thomas Passin via Python-list
On 5/29/2024 3:14 AM, Chris Angelico via Python-list wrote: On Wed, 29 May 2024 at 16:03, Cameron Simpson via Python-list wrote: By which Thomas means stuff like this: print(f'if block {name[index]} and index {index}') Notice the leading "f'". Personally I

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-28 Thread Thomas Passin via Python-list
Your code is unreadable. The lines have all run together. And after that, kindly explain what you want your code sample to do. "Process" doesn't say much. From what I can make out about what you are trying to do, you would do better to index through your string with for i, chr in enumerate

Re: Weird Stuff (Markdown, syntax highlighting and Python)

2024-05-27 Thread Thomas Passin via Python-list
On 5/26/2024 2:28 AM, Gilmeh Serda via Python-list wrote: The web claims (I think on all pages I've read about Markdown and Python) that this code should work, with some very minor variants on the topic: ```python import os with open(os.path.join('/home/user/apath', 'somefile')) as f: pri

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Thomas Passin via Python-list
On 5/19/2024 6:00 PM, Karsten Hilbert via Python-list wrote: Am Sun, May 19, 2024 at 10:45:09PM +0100 schrieb Barry via Python-list: On 18 May 2024, at 16:27, Peter J. Holzer via Python-list wrote: I don't think Linux users have to deal with venvs Modern debian (ubuntu) and fedora block us

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Thomas Passin via Python-list
On 5/19/2024 6:34 PM, Grant Edwards via Python-list wrote: On 2024-05-19, Barry via Python-list wrote: On 18 May 2024, at 16:27, Peter J. Holzer via Python-list wrote: I don't think Linux users have to deal with venvs Modern debian (ubuntu) and fedora block users installing using pip.

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Thomas Passin via Python-list
On 5/19/2024 6:08 PM, Skip Montanaro via Python-list wrote: Modern debian (ubuntu) and fedora block users installing using pip. Even if you're telling it to install in ~/.local? I could see not allowing to run it as root. I honestly haven't tried. Maybe I should... 🤔 I have an old laptop run

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Thomas Passin via Python-list
On 5/19/2024 3:32 AM, Alan Gauld via Python-list wrote: On 18/05/2024 19:12, Piergiorgio Sartor via Python-list wrote: [snip] The dependency nightmare created by python, pip and all the rest cannot be resolved otherwise. I've honestly never experienced this "nightmare". I install stuff an

Re: help

2024-05-13 Thread Thomas Passin via Python-list
On 5/12/2024 7:56 PM, Enrder via Python-list wrote: good tader I need help to install the bcml, and is that after installing the python and I go to the command prompt and put ''pip install bcml'' to install it tells me "pip" is not recognized as an internal or external command,

[RELEASE] Python 3.13.0 beta 1 released

2024-05-08 Thread Thomas Wouters via Python-list
.) - New deprecations <https://docs.python.org/3.13/whatsnew/3.13.html#deprecated>, most of which are scheduled for removal from Python 3.15 or 3.16. (Hey, *fellow core developer,* if a feature you find important is missing from this list, let Thomas know .) For more details on t

Re: how to discover what values produced an exception?

2024-05-03 Thread Thomas Passin via Python-list
On 5/3/2024 9:56 AM, Johanne Fairchild via Python-list wrote: How to discover what values produced an exception? Or perhaps---why doesn't the Python traceback show the values involved in the TypeError? For instance: --8<>8--- (0,0) < 4 T

  1   2   3   4   5   6   7   8   9   10   >