Re: Is there a better way? [combining f-string, thousands separator, right align]

2024-08-26 Thread dn via Python-list
On 26/08/24 23:00, Dan Sommers via Python-list wrote: On 2024-08-26 at 20:42:32 +1200, dn via Python-list wrote: and if we really want to go over-board: RIGHT_JUSTIFIED = ">" THOUSANDS_SEPARATOR = "," s_format = F"{RIGHT_JUSTIFIED}{S_FIELD_WIDTH}{THOUSANDS_SEPAR

Re: Script stops running with no error

2024-08-28 Thread dn via Python-list
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 data from wiktionary.org. I want to parse the json and ou

ListAdmin: Is list/archive working correctly?

2024-08-30 Thread dn via Python-list
For example, have been following the thread "Is there a better way? [combining f-string, thousands separator, right align]". Me email (only) client shows a thread of 12 messages. The OP was @Gilmeh Serda (from an invalid email address). That appears in the email thread @Stefan Ram has had t

Re: Formatting a str as a number - Okay, one more related thing...

2024-09-01 Thread dn via Python-list
On 1/09/24 06:55, MRAB via Python-list wrote: On 2024-08-31 06:31, Gilmeh Serda via Python-list wrote: On Fri, 30 Aug 2024 05:22:17 GMT, Gilmeh Serda wrote: f"{int(number):>20,}" I can find "," (comma) and I can find "_" (underscore) but how about " " (space)? Or any other character, for th

Re: Crash when launching python

2024-09-04 Thread dn via Python-list
On 5/09/24 03:27, Guenther Sohler via Python-list wrote: Hi, My "Project" is to integrate python support into OpenSCAD. It runs quite well, but there are still issues on MacOS. On My MacOS it works, but it crashes when I ship the DMG files. It looks very much like python is not able to find the

Re: Two python issues

2024-11-05 Thread dn via Python-list
On 6/11/24 10:08, Jason Friedman via Python-list wrote: (a) An error-prone "feature" is returning -1 if a substring is not found by "find", since -1 currently refers to the last item. An example: >>> s = 'qwertyuiop' >>> s[s.find('r')] 'r' >>> s[s.find('p')] 'p' >>> s[s.find('a')] 'p'

Re: learning Python

2024-10-27 Thread dn via Python-list
On 28/10/24 11:51, o1bigtenor via Python-list wrote: Greetings There are mountains of books out there. Any suggestions for documents for a just learning how to program and starting with Python (3)? Preference to a tool where I would be learning by doing - - - that works well for me. Coursera

Re: FileNotFoundError thrown due to file name in file, rather than file itself

2024-11-11 Thread dn via Python-list
On 12/11/24 10:17, Cameron Simpson via Python-list wrote: On 11Nov2024 18:24, [email protected] wrote: Loris Bennett wrote at 2024-11-11 15:05 +0100: I have the following in my program:    try:    logging.config.fileConfig(args.config_file)    config = configparser.ConfigParser()

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

2024-11-08 Thread dn via Python-list
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-word translation serves as badly in computer-pr

Re: Python 3.8 or later on Debian?

2024-09-18 Thread dn via Python-list
On 19/09/24 02:49, 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 really h

Re: Two aces up Python's sleeve

2024-11-07 Thread dn via Python-list
On 8/11/24 11:15, Greg Ewing via Python-list wrote: On 8/11/24 3:04 am, Mild Shock wrote: This only works for small integers. I guess this is because tagged pointers are used nowadays ? No, it's because integers in a certain small range are cached. Not sure what the actual range is nowadays,

Re: Python List is Not Dead

2024-12-26 Thread dn via Python-list
On 25/12/24 23:52, Abdur-Rahmaan Janhangeer via Python-list wrote: Hey all, I have been following discussions on Discourse (discuss.python.org) these last times. I think that it definitely lacks some of the joys of the mailing list: 1/ Categories The discussion has fixed categories. No channe

Re: Tools to help with text mode (i.e. non-GUI) input

2025-01-11 Thread dn via Python-list
On 12/01/25 03:28, Chris Green via Python-list wrote: I'm looking for Python packages that can help with text mode input, i.e. for use with non-GUI programs that one runs from the command prompt in a terminal window running a bash shell or some such. What I'm specifically after is a way to provi

Re: Struggling to understand Callable type hinting

2025-01-17 Thread dn via Python-list
On 18/01/25 12:33, Ian Pilcher via Python-list wrote: I am making my first attempt to use type hinting in a new project, and I'm quickly hitting areas that I'm having trouble understanding.  One of them is how to write type hints for a method decorator. Here is an example that illustrates my con

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

2024-12-24 Thread dn via Python-list
On 25/12/24 08:00, Michael Torrie via Python-list wrote: On 12/24/24 10:27 AM, marc nicole via Python-list wrote: the diagram is also attached here This text-only mailing list does not allow attachments, just FYI. Many devs use Markdown (or similar) text-only file-formats for technical doc

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

2024-12-24 Thread dn via Python-list
On 25/12/24 06:27, marc nicole via Python-list wrote: Hello community, I have created a Python code where a main algorithm uses three different modules (.py) after importing them. To illustrate and describe it I have created the following component diagram? [image: checkso.PNG] Could it be i

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

2024-12-25 Thread dn via Python-list
On 25/12/24 10:05, marc nicole wrote: > I want to convey the idea that main.py (main algorithm) imports 3 > modules (V, S, M) (each of them containing .py scripts related to > different functionalities) and use their methods accordingly as per the > requirement: basically the structure of my code

Re: Pip installs to unexpected place

2025-04-13 Thread dn via Python-list
On 14/04/25 11:10, Jonathan Gossage via Python-list wrote: I am using *Python 3.13* in a virtual environment under *Ubuntu Linux 24.04* . The version of Python was compiled from source code and installed with make altinstall. I attempted to use *pip* to install the *Sphinx* package into the virtu

Re: Pip installs to unexpected place

2025-04-15 Thread dn via Python-list
-discussions - but will hearing only half of some of the conversation help them? On 14/04/25 11:33, dn via Python-list wrote: On 14/04/25 11:10, Jonathan Gossage via Python-list wrote: I am using *Python 3.13* in a virtual environment under *Ubuntu Linux 24.04* . The version of Python was compiled

Re: Book recommendation? For getting up to date

2025-02-16 Thread dn via Python-list
On 17/02/25 01:50, Jan Erik Moström via Python-list wrote: I'm looking for a book that would teach me the lastest and greatest parts of Python, does anyone have any recommendations? I've looked at python.org and pythonbooks.org but I couldn't decide which one to get. I used to be fairly good

Re: Python tutor mailing list?

2025-05-27 Thread dn via Python-list
Message received! Hope you enjoyed your holiday... On 28/05/25 12:00, Alan Gauld via Python-list wrote: On 28/05/2025 00:32, Alan Gauld via Python-list wrote: The archives are still there and the sign-up page seems to work, but it doesn't recognise me. I tried signing up as a new member with

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( input_string

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 [his] “Better develo

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 see if it shows up, or I get a

PyPi mirrors

2025-08-24 Thread dn via Python-list
Hi, Do you use a mirror in front of the PyPi "Cheese Shop"? - perhaps a server like DevPi or Bandersnatch? - perhaps a personal interest or your enterprise? - is there public instance such as unis and others mirroring Linux distros? -- Regards, =dn -- https://mail.python.org/mailman3//lists/pyt

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). PS Ethan:

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 that for

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 tal

<    1   2   3   4   5