Re: Cprod -- (writing this: itertools.product([0, 1], repeat=N )

2024-05-21 Thread dn via Python-list
ays to improve it? https://python.readthedocs.io/en/stable/library/itertools.html#itertools.product -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2024-05-27 Thread dn via Python-list
#x27;d hate to spend an additional day or two, hunting for this info. Again, heavily dependent upon the tool in-use. For example, most SSGs and doc-tools (which accept Markdown) have a .css or theming-system which enables 'decorations'. References: https://pypi.org/project/Markdown/

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

2024-05-29 Thread dn via Python-list
may find a similar problem - in the similar manner to the various members who have helped YOU, voluntarily (and despite the paucity of source-information and response)? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2024-05-30 Thread dn via Python-list
y-rate for this work? Split into words - defined as you will. Use Counter. Show some (of your) code and we'll be happy to critique... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2024-06-04 Thread dn via Python-list
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 program that'd give me a list of all

Re: Anonymous email users

2024-06-14 Thread dn via Python-list
sting conundrum. There are good reasons and nefarious, for such behavior. Some have questioned my behavior in similar regard - asking why I use initials (also used IRL). It is because my first name "David" is/was very popular. At a meeting this week there were three of us. Thus, "Dav

Re: Anonymous email users

2024-06-17 Thread dn via Python-list
oming message is from a list - so easy accident.) The Delete-key is your friend! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Anonymous email users

2024-06-24 Thread dn via Python-list
ng GMail and MSFT's email services). 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! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Best use of "open" context manager

2024-07-06 Thread dn via Python-list
mber that whilst context-managers and generators are distinct concepts within Python, they are quite similar in many ways. So, a custom generator could work like a context-manager or 'wrap' a context-manager per Idea 1. Building a custom-class (Idea 1 or Idea 3) enables

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

2024-07-30 Thread dn via Python-list
uming it hasn't) why the dict has not been sorted into a meaningful order 3 how can one tell that the image is more likely to be a sheep than a train? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Help needed - - running into issues with python and its tools

2024-08-03 Thread dn via Python-list
earning/training will be necessary as pre-requisite to (being able to) attack the project). -- Regards =dn -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Help needed - - running into issues with python and its tools

2024-08-03 Thread dn via Python-list
On 4/08/24 09:34, o1bigtenor via Python-list wrote: On Sat, Aug 3, 2024 at 4:06 PM dn via Python-list wrote: On 4/08/24 08:17, o1bigtenor via Python-list wrote: Greetings Looking at ESP8266 and wanting to program it using micropython (really don't want to have to learn C++ (not enough

Re: bring back nntp library to python3

2024-08-14 Thread dn via Python-list
opponents desire! How should a 'community' handle such? How should decisions be made, and then communicated in such a way as to promote and build community, even though some members may be disappointed? Recently there was an election for PSF members. Did 'everyone' partici

Re: new here

2024-08-21 Thread dn via Python-list
ution you may be able to offer, and will look forward to hearing of the projects you attempt... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: new here

2024-08-21 Thread dn via Python-list
ard web-browser, try: https://www.yr.no/en/content/2-4164138/meteogram.svg -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: new here

2024-08-22 Thread dn via Python-list
-like-the-clappers! I haven't worked with CircuitPython lately and don't know if it has pulled in later features. Have you (gentle reader) used both and feel able to offer a comparison - when to prefer one over the other? [https://www.phrases.org.uk/meanings/like-the-clappers.html] -- R

Re: new here

2024-08-22 Thread dn via Python-list
On 23/08/24 15:43, rbowman via Python-list wrote: On Fri, 23 Aug 2024 08:36:02 +1200, dn wrote: On 23/08/24 07:49, rbowman via Python-list wrote: On Thu, 22 Aug 2024 10:40:52 -0700, Paul Rubin wrote: The Pico uses MicroPython which is stuck on an old version of Python, unfortunately. How

Re: new here

2024-08-25 Thread dn via Python-list
-with-the- pico/2 -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2024-08-26 Thread dn via Python-list
numbers: >>> s_format = F"{S_FIELD_WIDTH}{THOUSANDS_SEPARATOR}" To the extreme that if your user keeps fiddling with presentations (none ever do, do they?), all settings to do with s_format could be added to a config/environment file, and thus be even further separated from program-logic! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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
ou do ask for assistance you will be able to provide only the pertinent code AND some sample input-data with expected-results! (although, if all our dreams come true, you will answer your own question!) OK, is that enough by way of coding-tactics (not to mention the web-research) to keep you on-track for a while? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

ListAdmin: Is list/archive working correctly?

2024-08-30 Thread dn via Python-list
were they ever)? Is it user-error that some contributions don't appear on the list, but do appear in replies, or is there perhaps some other cause? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2024-09-01 Thread dn via Python-list
 456,78 Here's some old code, filched from somewhere (above web.ref?) and updated today to produce the above:- """ PythonExperiments:locale_numbers.py Demonstrate numeric-presentations in different cultures (locales). """ __author__ = "dn, IT&am

Re: Crash when launching python

2024-09-04 Thread dn via Python-list
ific configuration hook https://docs.python.org/3/library/site.html#module-site Please let us know how things progress... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Two python issues

2024-11-05 Thread dn via Python-list
y... ('nuff said!) With reference to the OP content about slicing: - Python's memory-addressing is different from many other languages. Thus, requires study before comparison/criticism - there are major differences in what can be accomplished with mutable and immutable objects -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: learning Python

2024-10-27 Thread dn via Python-list
. Coursera and edX have many courses. Harvard CS50-P (for Python) may suit... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2024-11-11 Thread dn via Python-list
n for rough definition of "block") should achieve one thing ("concern"). Thus, the advice to separate-out the file-read and attendant defensive-coding. This anticipates the problem (2) of distinguishing the subject of any one error/stack-trace from any others - and, argua

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

2024-11-08 Thread dn via Python-list
> x, y (6, 6) However, if such were submitted for Code Review, unhappiness would result. Was the question re-phrased to: how to ... in Python, we'd end-up with something more like this: >>> x = 5 # define >>> x += 1 # increment >>> y = x # alias >>> x, y (6, 6) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.8 or later on Debian?

2024-09-18 Thread dn via Python-list
used. Am sure there are plenty of how-to-installs. Here's one: https://bgasparotto.com/install-pyenv-ubuntu-debian Am using pyenv to support multiple projects initially built during the reign of multiple Python versions (which now update annually - next is about two weeks away). -- Regards,

Re: Two aces up Python's sleeve

2024-11-07 Thread dn via Python-list
= 1; b += 1; c -= 1; d -= 1 ... 0 0 0 0 1 1 -1 -1 2 2 -2 -2 3 3 -3 -3 4 4 -4 -4 5 5 -5 -5 6 6 7 7 8 8 9 9 ... 254 254 255 255 256 256 >>> Be aware that this is implementation-dependent and not guaranteed to hold forever. dn  ~  python Python 3.12.7 (main, Oct 1 2024, 00:0

Re: Python List is Not Dead

2024-12-26 Thread dn via Python-list
ity. Also, do I need to discuss the way so many people ask for help but give minimum assistance to their hoped-for respondents? https://www.catb.org/~esr/faqs/smart-questions.html ... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2025-01-11 Thread dn via Python-list
ations of packages to do this. Maybe a good place to start is the Python Prompt Toolkit (https://python-prompt-toolkit.readthedocs.io/en/master/) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Struggling to understand Callable type hinting

2025-01-17 Thread dn via Python-list
ase-in gradually - add the easy stuff now, and come back to deal with the rest later (otherwise the typing 'tail' is wagging the coding 'dog'!) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2024-12-24 Thread dn via Python-list
documentation. A tool for including block-graphics in these is "Mermaid" (https://mermaid.js.org/intro/). -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2024-12-24 Thread dn via Python-list
modules inside a larger "Algorithm" shape. -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2024-12-25 Thread dn via Python-list
modules", or something else. -- https://mail.python.org/mailman/listinfo/python-list -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Pip installs to unexpected place

2025-04-13 Thread dn via Python-list
, and was it activated at the time? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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
points which don't immediately 'sink in'). You will find many examples on Coursera* and edX*. - on Coursera am sad to advise avoiding U.Mich courses - they tend to be re-worded Java (I think) content, don't follow PEP-008 and 'miss' Python idioms - disclaimer: my work uses the edX platform (not Python) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Python tutor mailing list?

2025-05-27 Thread dn via Python-list
thing to do with the migration? It would have been nice to be told though. -- Regards, =dn -- https://mail.python.org/mailman3//lists/python-list.python.org

<    1   2   3   4   5   6