From thomas at python.org Thu Aug 1 05:33:35 2024 From: thomas at python.org (Thomas Wouters) Date: Thu, 1 Aug 2024 11:33:35 +0200 Subject: [RELEASE] Python 3.13.0 release candidate 1 released Message-ID: Python 3.13 *release candidate 1* is now available. https://www.python.org/downloads/release/python-3130rc1/ This is the first release candidate of Python 3.13.0 This release, *3.13.0rc1*, is the penultimate release preview. Entering the release candidate phase, only reviewed code changes which are clear bug fixes are allowed between this release candidate and the final release. The second candidate (and the last planned release preview) is scheduled for Tuesday, 2024-09-03, while the official release of 3.13.0 is scheduled for Tuesday, 2024-10-01. There will be *no ABI changes* from this point forward in the 3.13 series, and the goal is that there will be as few code changes as possible. Call to action We strongly encourage maintainers of third-party Python projects to prepare their projects for 3.13 compatibilities during this phase, and where necessary publish Python 3.13 wheels on PyPI to be ready for the final release of 3.13.0. Any binary wheels built against Python 3.13.0rc1 *will work* with future versions of Python 3.13. As always, report any issues to the Python bug tracker . Please keep in mind that this is a preview release and while it?s as close to the final release as we can get it, its use is *not* recommended for production environments. Core developers: time to work on documentation now - Are all your changes properly documented? - Are they mentioned in What?s New ? - Did you notice other changes you know of to have insufficient documentation? Major new features of the 3.13 series, compared to 3.12 Some of the new major new features and changes in Python 3.13 are: New features - A new and improved interactive interpreter , based on PyPy ?s, featuring multi-line editing and color support, as well as colorized exception tracebacks . - An *experimental* free-threaded build mode , which disables the Global Interpreter Lock, allowing threads to run more concurrently. The build mode is available as an experimental feature in the Windows and macOS installers as well. - A preliminary, *experimental* JIT , providing the ground work for significant performance improvements. - The locals() builtin function (and its C equivalent) now has well-defined semantics when mutating the returned mapping , which allows debuggers to operate more consistently. - The (cyclic) garbage collector is now incremental , which should mean shorter pauses for collection in programs with a lot of objects. - A modified version of mimalloc is now included, optional but enabled by default if supported by the platform, and required for the free-threaded build mode. - Docstrings now have their leading indentation stripped , reducing memory use and the size of .pyc files. (Most tools handling docstrings already strip leading indentation.) - The dbm module has a new dbm.sqlite3 backend that is used by default when creating new files. - The minimum supported macOS version was changed from 10.9 to *10.13 (High Sierra)*. Older macOS versions will not be supported going forward. - WASI is now a Tier 2 supported platform . Emscripten is no longer an officially supported platform (but Pyodide continues to support Emscripten). - iOS is now a Tier 3 supported platform , with Android on the way as well . Typing - Support for type defaults in type parameters . - A new type narrowing annotation , typing.TypeIs. - A new annotation for read-only items in TypeDicts . - A new annotation for marking deprecations in the type system . Removals and new deprecations - PEP 594 (Removing dead batteries from the standard library) scheduled removals of many deprecated modules: aifc, audioop, chunk, cgi, cgitb, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, xdrlib, lib2to3. - Many other removals of deprecated classes, functions and methods in various standard library modules. - C API removals and deprecations . (Some removals present in alpha 1 were reverted in alpha 2, as the removals were deemed too disruptive at this time.) - New deprecations , 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 . The next pre-release of Python 3.13 will be 3.13.0rc2, *the final release candidate*, currently scheduled for 2024-09-03. More resources - Online Documentation - PEP 719 , 3.13 Release Schedule - Report bugs at Issues ? python/cpython ? GitHub . - Help fund Python directly (or via GitHub Sponsors ), and support the Python community . 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 Software Foundation. Your release team, Thomas Wouters ?ukasz Langa Ned Deily Steve Dower -- Thomas Wouters From barry at barrys-emacs.org Sat Aug 3 14:49:48 2024 From: barry at barrys-emacs.org (Barry Scott) Date: Sat, 3 Aug 2024 19:49:48 +0100 Subject: Installation of Slixfeed with pip fails In-Reply-To: <20240730203643.7810f6dc@workstation.localdomain> References: <20240730203643.7810f6dc@workstation.localdomain> Message-ID: <17F316FA-3A1B-48E3-9098-07C3CF32908A@barrys-emacs.org> > 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 encryption, and a friend of > mine has reported that there is an issue installing it with pip. > > I suppoes this is a fault of a package at PyPi, or a fault at my > pyproject.toml. > > This is the link to the project: > https://git.xmpp-it.net/sch/Slixfeed#getting-started > > Please advise, Please duplicate the problem and if after doing that you have not fixed the problem post details here. Barry > Schimon > -- > https://mail.python.org/mailman/listinfo/python-list > From o1bigtenor at gmail.com Sat Aug 3 16:17:11 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Sat, 3 Aug 2024 15:17:11 -0500 Subject: Help needed - - running into issues with python and its tools Message-ID: Greetings Looking at ESP8266 and wanting to program it using micropython (really don't want to have to learn C++ (not enough hours in the day as it is!!)). One of the tools I need to be able to use is esptools - - well in the devuan world you need to run that on either Devaun 3 or 5 - - - its just not available on devuan 4. Tried installing all the tools I need using downloads and .deb installs but then I need to have python3.12 and that's also not part of Devuan4. Not versed enough to set up a good venv (if that's possible) so that I could work in that specific venv and have my cake (and get to eat it too (grin!). Suggestions - - - ideas - - - please? TIA From PythonList at DancesWithMice.info Sat Aug 3 17:04:11 2024 From: PythonList at DancesWithMice.info (dn) Date: Sun, 4 Aug 2024 09:04:11 +1200 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: Message-ID: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> 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 hours in the day as it is!!)). > > One of the tools I need to be able to use is esptools - - well in the > devuan world you need to run that on either Devaun 3 or 5 - - - its just > not available on devuan 4. > > Tried installing all the tools I need using downloads and .deb installs but > then I need to have python3.12 and that's also not part of Devuan4. > > Not versed enough to set up a good venv (if that's possible) so that I > could work in that specific venv and have my cake (and get to eat it too > (grin!). > > Suggestions - - - ideas - - - please? Sorry if this offends, but this is a list of short-cuts and reasons why they don't work (immediately). Have just come from a discussion about 'how to start a project'. Amongst the questions to ask are: "what resources do we have (or can add) to achieve?". In this case, if Python-skill is a "personnel-resource" (and C++ a "constraint"), will question the ESP over Raspberry Pi (say)? Why talking of Python 3.12 when the solution involves MicroPython? Perhaps need to take a step back and look at 'options' - relate needs to resources, and evaluate the impact of each decision on later ones - as well as against your personal skills (modify objectives to limits, or accept that some learning/training will be necessary as pre-requisite to (being able to) attack the project). -- Regards =dn -- Regards, =dn From o1bigtenor at gmail.com Sat Aug 3 17:34:47 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Sat, 3 Aug 2024 16:34:47 -0500 Subject: Help needed - - running into issues with python and its tools In-Reply-To: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> Message-ID: 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 hours in the day as it > is!!)). > > > > One of the tools I need to be able to use is esptools - - well in the > > devuan world you need to run that on either Devaun 3 or 5 - - - its just > > not available on devuan 4. > > > > Tried installing all the tools I need using downloads and .deb installs > but > > then I need to have python3.12 and that's also not part of Devuan4. > > > > Not versed enough to set up a good venv (if that's possible) so that I > > could work in that specific venv and have my cake (and get to eat it too > > (grin!). > > > > Suggestions - - - ideas - - - please? > > Sorry if this offends, but this is a list of short-cuts and reasons why > they don't work (immediately). > > > Have just come from a discussion about 'how to start a project'. Amongst > the questions to ask are: "what resources do we have (or can add) to > achieve?". > Fair question details interleaved - - - > > In this case, if Python-skill is a "personnel-resource" (and C++ a > "constraint"), will question the ESP over Raspberry Pi (say)? > Well - - - RPi world technical specs is usable from -20 to 60 C (iirc on the top number) and for my project I absolutely need to have usability to at least -40 - - could possibly do a bit less but -35 C is a hard requirement so the RPi and Pico (which I would like to use) is out but ESP8266 runs in that -40 to 65 C range. > > Why talking of Python 3.12 when the solution involves MicroPython? > Because one uses psytool on one computer to transfer a program to the MicroPython system. In fact there are a set of tools that need Python3.12 to be able to do this and therefore the question. > > > Perhaps need to take a step back and look at 'options' - relate needs to > resources, and evaluate the impact of each decision on later ones - as > well as against your personal skills (modify objectives to limits, or > accept that some learning/training will be necessary as pre-requisite to > (being able to) attack the project). > > I have been investigating using a venv but am not finding clear directions so that I could set up Python3.12 inside (along with the other needed tools). The more I'm looking the less useful most of the information I'm finding is becoming. Therefore I thought I would go to the python gurus for information - - - which I have. So please - - - how do I set up a venv so that I can install and run python 3.12 (and other needed programs related to 3.12) inside? TIA From list1 at tompassin.net Sat Aug 3 16:04:07 2024 From: list1 at tompassin.net (Thomas Passin) Date: Sat, 3 Aug 2024 16:04:07 -0400 Subject: Installation of Slixfeed with pip fails In-Reply-To: <17F316FA-3A1B-48E3-9098-07C3CF32908A@barrys-emacs.org> References: <20240730203643.7810f6dc@workstation.localdomain> <17F316FA-3A1B-48E3-9098-07C3CF32908A@barrys-emacs.org> Message-ID: <18dc5792-7a6e-4ba6-9d00-fa5d2777a0f2@tompassin.net> 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 encryption, and a friend of >> mine has reported that there is an issue installing it with pip. >> >> I suppoes this is a fault of a package at PyPi, or a fault at my >> pyproject.toml. >> >> This is the link to the project: >> https://git.xmpp-it.net/sch/Slixfeed#getting-started >> >> Please advise, This question is like asking "My car won't run. I suppose it's the engine. Please advise." > Please duplicate the problem and if after doing that you have not fixed > the problem post details here. > > Barry > > > >> Schimon >> -- >> https://mail.python.org/mailman/listinfo/python-list >> > From cs at cskk.id.au Sat Aug 3 19:11:02 2024 From: cs at cskk.id.au (Cameron Simpson) Date: Sun, 4 Aug 2024 09:11:02 +1000 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: Message-ID: On 03Aug2024 16:34, o1bigtenor wrote: >So please - - - how do I set up a venv so that I can install and run >python >3.12 >(and other needed programs related to 3.12) inside? Maybe this github comment will help with this: https://github.com/orgs/micropython/discussions/10255#discussioncomment-4444671 From PythonList at DancesWithMice.info Sat Aug 3 20:08:54 2024 From: PythonList at DancesWithMice.info (dn) Date: Sun, 4 Aug 2024 12:08:54 +1200 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> Message-ID: <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> 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 hours in the day as it >> is!!)). >>> >>> One of the tools I need to be able to use is esptools - - well in the >>> devuan world you need to run that on either Devaun 3 or 5 - - - its just >>> not available on devuan 4. >>> >>> Tried installing all the tools I need using downloads and .deb installs >> but >>> then I need to have python3.12 and that's also not part of Devuan4. >>> >>> Not versed enough to set up a good venv (if that's possible) so that I >>> could work in that specific venv and have my cake (and get to eat it too >>> (grin!). >>> >>> Suggestions - - - ideas - - - please? >> >> Sorry if this offends, but this is a list of short-cuts and reasons why >> they don't work (immediately). >> >> >> Have just come from a discussion about 'how to start a project'. Amongst >> the questions to ask are: "what resources do we have (or can add) to >> achieve?". >> > > Fair question details interleaved - - - > >> >> In this case, if Python-skill is a "personnel-resource" (and C++ a >> "constraint"), will question the ESP over Raspberry Pi (say)? >> > > Well - - - RPi world technical specs is usable from -20 to 60 C (iirc on > the top number) > and for my project I absolutely need to have usability to at least -40 - - > could possibly do a bit less but -35 C is a hard requirement so the RPi > and Pico (which I would like to use) is out but ESP8266 runs in that -40 to > 65 C > range. Interesting, but creates a mis-match of tools - battles for you to fight... >> Why talking of Python 3.12 when the solution involves MicroPython? >> > > Because one uses psytool on one computer to transfer a program to the > MicroPython system. In fact there are a set of tools that need Python3.12 > to be able to do this and therefore the question. > >> >> >> Perhaps need to take a step back and look at 'options' - relate needs to >> resources, and evaluate the impact of each decision on later ones - as >> well as against your personal skills (modify objectives to limits, or >> accept that some learning/training will be necessary as pre-requisite to >> (being able to) attack the project). >> >> I have been investigating using a venv but am not finding clear directions > so > that I could set up Python3.12 inside (along with the other needed tools). > The > more I'm looking the less useful most of the information I'm finding is > becoming. > Therefore I thought I would go to the python gurus for information - - - > which I > have. > > So please - - - how do I set up a venv so that I can install and run python > 3.12 > (and other needed programs related to 3.12) inside? If you mean venv itself, which "directions" have you reviewed? This one (https://python.land/virtual-environments/virtualenv) seems very straight-forward and shows "What's inside a venv?" to include python.exe. Given that venv is more-or-less the official/traditional solution, what are you doing differently - perhaps the question is lacking detail. (see also @Cameron's take) Personally, I'm using Poetry (https://python-poetry.org) which seemed just as easy to pick-up; plus pyenv to maintain multiple versions of Python on one machine. -- Regards, =dn From o1bigtenor at gmail.com Sat Aug 3 21:49:13 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Sat, 3 Aug 2024 20:49:13 -0500 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: Message-ID: On Sat, Aug 3, 2024 at 6:20?PM Cameron Simpson via Python-list < python-list at python.org> wrote: > On 03Aug2024 16:34, o1bigtenor wrote: > >So please - - - how do I set up a venv so that I can install and run > >python > >3.12 > >(and other needed programs related to 3.12) inside? > > Maybe this github comment will help with this: > > https://github.com/orgs/micropython/discussions/10255#discussioncomment-4444671 > Not really. A computer that has psytool + about 5 or 6 other python 3.12 tools is needed to load the microcontroller so I don't see how having venv in the microcontroller would help the loading of software onto the microcontroller. Regards From o1bigtenor at gmail.com Sat Aug 3 22:03:48 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Sat, 3 Aug 2024 21:03:48 -0500 Subject: Help needed - - running into issues with python and its tools In-Reply-To: <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> Message-ID: On Sat, Aug 3, 2024 at 7:11?PM dn via Python-list wrote: > On 4/08/24 09:34, o1bigtenor via Python-list wrote: > > On Sat, Aug 3, 2024 at 4:06?PM dn via Python-list < > python-list at python.org> > > 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 hours in the day as it > >> is!!)). > >>> > >>> One of the tools I need to be able to use is esptools - - well in the > >>> devuan world you need to run that on either Devaun 3 or 5 - - - its > just > >>> not available on devuan 4. > >>> > >>> Tried installing all the tools I need using downloads and .deb installs > >> but > >>> then I need to have python3.12 and that's also not part of Devuan4. > >>> > >>> Not versed enough to set up a good venv (if that's possible) so that I > >>> could work in that specific venv and have my cake (and get to eat it > too > >>> (grin!). > >>> > >>> Suggestions - - - ideas - - - please? > >> > >> Sorry if this offends, but this is a list of short-cuts and reasons why > >> they don't work (immediately). > >> > >> > >> Have just come from a discussion about 'how to start a project'. Amongst > >> the questions to ask are: "what resources do we have (or can add) to > >> achieve?". > >> > > > > Fair question details interleaved - - - > > > >> > >> In this case, if Python-skill is a "personnel-resource" (and C++ a > >> "constraint"), will question the ESP over Raspberry Pi (say)? > >> > > > > Well - - - RPi world technical specs is usable from -20 to 60 C (iirc on > > the top number) > > and for my project I absolutely need to have usability to at least -40 - > - > > could possibly do a bit less but -35 C is a hard requirement so the RPi > > and Pico (which I would like to use) is out but ESP8266 runs in that -40 > to > > 65 C > > range. > > Interesting, but creates a mis-match of tools - battles for you to fight... > Not really - - - it takes a computer with psytool and about 5 or 6 other python3.12 programs to load the microcontroller. It is in writing the program for the microcontroller that micropython is used not at all in the loading. > > > >> Why talking of Python 3.12 when the solution involves MicroPython? > >> > > > > Because one uses psytool on one computer to transfer a program to the > > MicroPython system. In fact there are a set of tools that need > Python3.12 > > to be able to do this and therefore the question. > > > >> > >> > >> Perhaps need to take a step back and look at 'options' - relate needs to > >> resources, and evaluate the impact of each decision on later ones - as > >> well as against your personal skills (modify objectives to limits, or > >> accept that some learning/training will be necessary as pre-requisite to > >> (being able to) attack the project). > >> > >> I have been investigating using a venv but am not finding clear > directions > > so > > that I could set up Python3.12 inside (along with the other needed > tools). > > The > > more I'm looking the less useful most of the information I'm finding is > > becoming. > > Therefore I thought I would go to the python gurus for information - - - > > which I > > have. > > > > So please - - - how do I set up a venv so that I can install and run > python > > 3.12 > > (and other needed programs related to 3.12) inside? > > If you mean venv itself, which "directions" have you reviewed? > This one (https://python.land/virtual-environments/virtualenv) seems > very straight-forward and shows "What's inside a venv?" to include > python.exe. Given that venv is more-or-less the official/traditional > solution, what are you doing differently - perhaps the question is > lacking detail. > > Interesting - - - that's the doc I have been reading. My question was, is and will be (and the doc absolutely doesn't cover it) how do I install a different version in the venv so that python 3.11.x on the system is not discombobulated by the python 3.12.x in the venv. That python 3.12 would let me run the tools needed. (Its the how to install the next version of python that I just haven't been able to find information on - - - and I would be looking for information on how to install on a *nix.) > Personally, I'm using Poetry (https://python-poetry.org) which seemed > just as easy to pick-up; plus pyenv to maintain multiple versions of > Python on one machine. > > Will give python-poetry a look. Have been looking at pyenv but that seems to be a whole rat's nest of other stuff to install and its using a bunch of different tools to get there - - - is it necessary - - - yes or no (in the running of multiple python versions on the same machine). Regards From hjp-python at hjp.at Sun Aug 4 05:17:17 2024 From: hjp-python at hjp.at (Peter J. Holzer) Date: Sun, 4 Aug 2024 11:17:17 +0200 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: Message-ID: <20240804091717.etqgritnzec7ldr4@hjp.at> On 2024-08-03 15:17:11 -0500, o1bigtenor via Python-list wrote: > One of the tools I need to be able to use is esptools - - well in the > devuan world you need to run that on either Devaun 3 or 5 - - - its just > not available on devuan 4. Couldn't you just upgrade to Devuan 5, then? > Tried installing all the tools I need using downloads and .deb installs but > then I need to have python3.12 and that's also not part of Devuan4. It seems weird that something would work with the (presumably) older version of Python in Devuan 3 and the (presumably) newer version of Python in Devuan 5, but not with the version in Devuan 4. > Not versed enough to set up a good venv (if that's possible) so that I > could work in that specific venv and have my cake (and get to eat it too > (grin!). You need to install Python first to create a venv. AFAIK there is no way to set up a venv first and then install Python into it. Does Devuan have a testing or unstable suite? You might be able to install a newer Python version from that. If not your best bet is to install Python from source. hp -- _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp at hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From mats at wichmann.us Sun Aug 4 09:47:19 2024 From: mats at wichmann.us (Mats Wichmann) Date: Sun, 4 Aug 2024 07:47:19 -0600 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> Message-ID: <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> On 8/3/24 20:03, o1bigtenor via Python-list wrote: > My question was, is and will be (and the doc absolutely doesn't cover it) > how do I install a different version in the venv so that python 3.11.x on > the > system is not discombobulated by the python 3.12.x in the venv. > That python 3.12 would let me run the tools needed. > (Its the how to install the next version of python that I just haven't been > able to find information on - - - and I would be looking for information > on how to install on a *nix.) To get a different Python "in" the venv, you use the version you want in the construction of the venv. For example: $ python3.13 -m venv new_venv $ new_venv/bin/python --version Python 3.13.0b4 $ source new_venv/bin/activate ... From o1bigtenor at gmail.com Mon Aug 5 08:44:47 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Mon, 5 Aug 2024 07:44:47 -0500 Subject: Help needed - - running into issues with python and its tools In-Reply-To: <20240804091717.etqgritnzec7ldr4@hjp.at> References: <20240804091717.etqgritnzec7ldr4@hjp.at> Message-ID: On Sun, Aug 4, 2024 at 4:24?AM Peter J. Holzer via Python-list < python-list at python.org> wrote: > On 2024-08-03 15:17:11 -0500, o1bigtenor via Python-list wrote: > > One of the tools I need to be able to use is esptools - - well in the > > devuan world you need to run that on either Devaun 3 or 5 - - - its just > > not available on devuan 4. > > Couldn't you just upgrade to Devuan 5, then? > I like uptime and not measured in hours either so I'm presently not running Devuan 5 or testing - - - although I used to. Just found that I didn't need the most recent versions of most of the tools I was using so find the stability (except for the bloody browsers) in stable version is to be appreciated. > > > > Tried installing all the tools I need using downloads and .deb installs > but > > then I need to have python3.12 and that's also not part of Devuan4. > > It seems weird that something would work with the (presumably) older > version of Python in Devuan 3 and the (presumably) newer version of > Python in Devuan 5, but not with the version in Devuan 4. > Well - - - pstool was available in a version that worked in Devuan 3, psytool is available in a version that works in Devuan 4 - - - beyond my pay grade as to why there isn't a version available for Devuan 4. > > > > Not versed enough to set up a good venv (if that's possible) so that I > > could work in that specific venv and have my cake (and get to eat it too > > (grin!). > > You need to install Python first to create a venv. AFAIK there is no way > to set up a venv first and then install Python into it. > > Does Devuan have a testing or unstable suite? You might be able to > install a newer Python version from that. If not your best bet is to > install Python from source. > > First question answered earlier. If I installed python 3.12 from source I would create a hung system for myself. (Been there and done that - - - got the T-shirt and it still stinks!) Regards From o1bigtenor at gmail.com Mon Aug 5 08:48:54 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Mon, 5 Aug 2024 07:48:54 -0500 Subject: Help needed - - running into issues with python and its tools In-Reply-To: <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> Message-ID: On Sun, Aug 4, 2024 at 8:49?AM Mats Wichmann via Python-list < python-list at python.org> wrote: > On 8/3/24 20:03, o1bigtenor via Python-list wrote: > > > My question was, is and will be (and the doc absolutely doesn't cover it) > > how do I install a different version in the venv so that python 3.11.x on > > the > > system is not discombobulated by the python 3.12.x in the venv. > > That python 3.12 would let me run the tools needed. > > (Its the how to install the next version of python that I just haven't > been > > able to find information on - - - and I would be looking for information > > on how to install on a *nix.) > > To get a different Python "in" the venv, you use the version you want in > the construction of the venv. For example: > > > $ python3.13 -m venv new_venv > $ new_venv/bin/python --version > Python 3.13.0b4 > $ source new_venv/bin/activate > > "https://peps.python.org/pep-0668/ PEP 668, which prevents pip from interacting with the OS installed python. This change has been done in red hat and other distros too . . . " similarly your first command produces and error code for the same reason. Sorry - - - not my policy - - - Regards From mats at wichmann.us Mon Aug 5 09:51:06 2024 From: mats at wichmann.us (Mats Wichmann) Date: Mon, 5 Aug 2024 07:51:06 -0600 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> Message-ID: <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> On 8/5/24 06:48, o1bigtenor via Python-list wrote: > On Sun, Aug 4, 2024 at 8:49?AM Mats Wichmann via Python-list < > python-list at python.org> wrote: > >> On 8/3/24 20:03, o1bigtenor via Python-list wrote: >> >>> My question was, is and will be (and the doc absolutely doesn't cover it) >>> how do I install a different version in the venv so that python 3.11.x on >>> the >>> system is not discombobulated by the python 3.12.x in the venv. >>> That python 3.12 would let me run the tools needed. >>> (Its the how to install the next version of python that I just haven't >> been >>> able to find information on - - - and I would be looking for information >>> on how to install on a *nix.) >> >> To get a different Python "in" the venv, you use the version you want in >> the construction of the venv. For example: >> >> >> $ python3.13 -m venv new_venv >> $ new_venv/bin/python --version >> Python 3.13.0b4 >> $ source new_venv/bin/activate >> >> > "https://peps.python.org/pep-0668/ PEP 668, which prevents pip from > interacting with the OS installed python. This change has been done in red > hat and other distros too . . . " > > similarly your first command produces and error code for the same reason. > > Sorry - - - not my policy - - - What? Yes, the *system* pip should have some restrictions, if it's a system mainly managed by a package manager. Setting up a venv is the *expected* approach to such situations, and creating one doesn't cause any problems. You end up with a pip in the activated venv that's going to install to a different path (the one in the venv), and will not be marked as externally managed, as the package manager has no control over that path. That's the whole point. What error are you getting? The venv module is not the pip module so restrictions on the system pip have nothing to do with it. From o1bigtenor at gmail.com Mon Aug 5 16:39:37 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Mon, 5 Aug 2024 15:39:37 -0500 Subject: Help needed - - running into issues with python and its tools In-Reply-To: <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> Message-ID: Matt - if you would rather that you were not included in the address list - - please advise. On Mon, Aug 5, 2024 at 8:51?AM Mats Wichmann wrote: > On 8/5/24 06:48, o1bigtenor via Python-list wrote: > > On Sun, Aug 4, 2024 at 8:49?AM Mats Wichmann via Python-list < > > python-list at python.org> wrote: > > > >> On 8/3/24 20:03, o1bigtenor via Python-list wrote: > >> > >>> My question was, is and will be (and the doc absolutely doesn't cover > it) > >>> how do I install a different version in the venv so that python 3.11.x > on > >>> the > >>> system is not discombobulated by the python 3.12.x in the venv. > >>> That python 3.12 would let me run the tools needed. > >>> (Its the how to install the next version of python that I just haven't > >> been > >>> able to find information on - - - and I would be looking for > information > >>> on how to install on a *nix.) > >> > >> To get a different Python "in" the venv, you use the version you want in > >> the construction of the venv. For example: > >> > >> > >> $ python3.13 -m venv new_venv > >> $ new_venv/bin/python --version > >> Python 3.13.0b4 > >> $ source new_venv/bin/activate > >> > >> > > "https://peps.python.org/pep-0668/ PEP 668, which prevents pip from > > interacting with the OS installed python. This change has been done in > red > > hat and other distros too . . . " > > > > similarly your first command produces and error code for the same reason. > > > > Sorry - - - not my policy - - - > > What? Yes, the *system* pip should have some restrictions, if it's a > system mainly managed by a package manager. > > Setting up a venv is the *expected* approach to such situations, and > creating one doesn't cause any problems. You end up with a pip in the > activated venv that's going to install to a different path (the one in > the venv), and will not be marked as externally managed, as the package > manager has no control over that path. > > That's the whole point. What error are you getting? The venv module is > not the pip module so restrictions on the system pip have nothing to do > with it. > > set up pyenv activated a venv trying to install python3.12 into it 1. download of python3.12 (blahblahblahetc).deb will not install 2. download of python3.12.tar.xz similarly will not install (venv2) memyself at devuanbigbox:~$ pip install /home/memyself/Downloads/Python-3.12.4.tar.xz Processing ./Downloads/Python-3.12.4.tar.xz ERROR: file:///home/memyself/Downloads/Python-3.12.4.tar.xz does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found. seems that I need a different version (installable as it were) of python3.12 or my approach is all wrong! Please advise TIA From bill at baddogconsulting.com Mon Aug 5 16:55:44 2024 From: bill at baddogconsulting.com (Bill Deegan) Date: Mon, 5 Aug 2024 13:55:44 -0700 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> Message-ID: Your approach is wrong. You don't build python from source using pip. You don't install new versions of python into a venv either. Have you read the following? https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html That seems to have instructions for what you want to do.. -Bill On Mon, Aug 5, 2024 at 1:41?PM o1bigtenor via Python-list < python-list at python.org> wrote: > Matt - if you would rather that you were not included in the address list - > - > please advise. > > On Mon, Aug 5, 2024 at 8:51?AM Mats Wichmann wrote: > > > On 8/5/24 06:48, o1bigtenor via Python-list wrote: > > > On Sun, Aug 4, 2024 at 8:49?AM Mats Wichmann via Python-list < > > > python-list at python.org> wrote: > > > > > >> On 8/3/24 20:03, o1bigtenor via Python-list wrote: > > >> > > >>> My question was, is and will be (and the doc absolutely doesn't cover > > it) > > >>> how do I install a different version in the venv so that python > 3.11.x > > on > > >>> the > > >>> system is not discombobulated by the python 3.12.x in the venv. > > >>> That python 3.12 would let me run the tools needed. > > >>> (Its the how to install the next version of python that I just > haven't > > >> been > > >>> able to find information on - - - and I would be looking for > > information > > >>> on how to install on a *nix.) > > >> > > >> To get a different Python "in" the venv, you use the version you want > in > > >> the construction of the venv. For example: > > >> > > >> > > >> $ python3.13 -m venv new_venv > > >> $ new_venv/bin/python --version > > >> Python 3.13.0b4 > > >> $ source new_venv/bin/activate > > >> > > >> > > > "https://peps.python.org/pep-0668/ PEP 668, which prevents pip from > > > interacting with the OS installed python. This change has been done in > > red > > > hat and other distros too . . . " > > > > > > similarly your first command produces and error code for the same > reason. > > > > > > Sorry - - - not my policy - - - > > > > What? Yes, the *system* pip should have some restrictions, if it's a > > system mainly managed by a package manager. > > > > Setting up a venv is the *expected* approach to such situations, and > > creating one doesn't cause any problems. You end up with a pip in the > > activated venv that's going to install to a different path (the one in > > the venv), and will not be marked as externally managed, as the package > > manager has no control over that path. > > > > That's the whole point. What error are you getting? The venv module is > > not the pip module so restrictions on the system pip have nothing to do > > with it. > > > > set up pyenv > activated a venv > trying to install python3.12 into it > > 1. download of python3.12 (blahblahblahetc).deb will not install > 2. download of python3.12.tar.xz similarly will not install > > (venv2) memyself at devuanbigbox:~$ pip install > /home/memyself/Downloads/Python-3.12.4.tar.xz > Processing ./Downloads/Python-3.12.4.tar.xz > ERROR: file:///home/memyself/Downloads/Python-3.12.4.tar.xz does not appear > to be a Python project: neither 'setup.py' nor 'pyproject.toml' found. > > seems that I need a different version (installable as it were) of > python3.12 > or my approach is all wrong! > > Please advise > > TIA > -- > https://mail.python.org/mailman/listinfo/python-list > From mats at wichmann.us Mon Aug 5 16:56:13 2024 From: mats at wichmann.us (Mats Wichmann) Date: Mon, 5 Aug 2024 14:56:13 -0600 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> Message-ID: <2066444d-2b5d-4b09-b1a8-8242c68591d1@wichmann.us> On 8/5/24 14:39, o1bigtenor wrote: > Matt - if you would rather that you were not included in the address > list - - > please advise. > > On Mon, Aug 5, 2024 at 8:51?AM Mats Wichmann > wrote: > > On 8/5/24 06:48, o1bigtenor via Python-list wrote: > > On Sun, Aug 4, 2024 at 8:49?AM Mats Wichmann via Python-list < > > python-list at python.org > wrote: > > > >> On 8/3/24 20:03, o1bigtenor via Python-list wrote: > >> > >>> My question was, is and will be (and the doc absolutely doesn't > cover it) > >>> how do I install a different version in the venv so that python > 3.11.x on > >>> the > >>> system is not discombobulated by the python 3.12.x in the venv. > >>> That python 3.12 would let me run the tools needed. > >>> (Its the how to install the next version of python that I just > haven't > >> been > >>> able to find information on - - - and I would be looking for > information > >>> on how to install on a *nix.) > >> > >> To get a different Python "in" the venv, you use the version you > want in > >> the construction of the venv. For example: > >> > >> > >> $ python3.13 -m venv new_venv > >> $ new_venv/bin/python --version > >> Python 3.13.0b4 > >> $ source new_venv/bin/activate > >> > >> > >? ?"https://peps.python.org/pep-0668/ > PEP 668, which prevents pip from > > interacting with the OS installed python. This change has been > done in red > > hat and other distros too . . . " > > > > similarly your first command produces and error code for the same > reason. > > > > Sorry - - - not my policy - - - > > What? Yes, the *system* pip should have some restrictions, if it's a > system mainly managed by a package manager. > > Setting up a venv is the *expected* approach to such situations, and > creating one doesn't cause any problems. You end up with a pip in the > activated venv that's going to install to a different path (the one in > the venv), and will not be marked as externally managed, as the package > manager has no control over that path. > > That's the whole point.? What error are you getting?? The venv > module is > not the pip module so restrictions on the system pip have nothing to do > with it. > > set up pyenv > activated a venv > trying to install python3.12 into it > > 1. download of python3.12 (blahblahblahetc).deb will not install > 2. download of python3.12.tar.xz similarly will not install > > (venv2) memyself at devuanbigbox:~$ pip install > /home/memyself/Downloads/Python-3.12.4.tar.xz > Processing ./Downloads/Python-3.12.4.tar.xz > ERROR: file:///home/memyself/Downloads/Python-3.12.4.tar.xz does not > appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' > found. > > seems that I need a different version (installable as it were) of > python3.12 > or my approach is all wrong! you can't install Python "into" a venv. you use a version of Python as the base when *creating* a venv, the venv will use the same binary as the base python (symlinks if possible, as in the Linux case), but with different paths. Since you've already got pyenv, use it to build the version you want to use - I think you said there wasn't a deb for 3.12 in your distro? That's something like pyenv install 3.12.4 that will use the build recipe it has... and hopefully work. Distro Pythons sometimes have some strange setups that are hard to reproduce. Pyenv knows how to build micropython, too, should it ever come to that. If you indeed found a deb for the right Python, use apt to install it, and then use *that* Python to create your venv. If you have the pyenv-virtualenv plugin, you can ask it to make the virtualenv for you, if pyenv built the Python From o1bigtenor at gmail.com Mon Aug 5 17:07:56 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Mon, 5 Aug 2024 16:07:56 -0500 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> Message-ID: On Mon, Aug 5, 2024 at 3:55?PM Bill Deegan wrote: > Your approach is wrong. > You don't build python from source using pip. > > You don't install new versions of python into a venv either. > > Have you read the following? > https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html > > That seems to have instructions for what you want to do.. > See item 1.4 - - - - that's where I'm at (and that's where the problems are hidden at as well!) Regards From o1bigtenor at gmail.com Mon Aug 5 17:17:16 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Mon, 5 Aug 2024 16:17:16 -0500 Subject: Help needed - - running into issues with python and its tools In-Reply-To: <2066444d-2b5d-4b09-b1a8-8242c68591d1@wichmann.us> References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> <2066444d-2b5d-4b09-b1a8-8242c68591d1@wichmann.us> Message-ID: On Mon, Aug 5, 2024 at 3:56?PM Mats Wichmann wrote: > > > On Mon, Aug 5, 2024 at 8:51?AM Mats Wichmann > > wrote: > > > > On 8/5/24 06:48, o1bigtenor via Python-list wrote: > > > On Sun, Aug 4, 2024 at 8:49?AM Mats Wichmann via Python-list < > > > python-list at python.org > wrote: > > > > > >> On 8/3/24 20:03, o1bigtenor via Python-list wrote: > > >> > > >>> My question was, is and will be (and the doc absolutely doesn't > > cover it) > > >>> how do I install a different version in the venv so that python > > 3.11.x on > > >>> the > > >>> system is not discombobulated by the python 3.12.x in the venv. > > >>> That python 3.12 would let me run the tools needed. > > >>> (Its the how to install the next version of python that I just > > haven't > > >> been > > >>> able to find information on - - - and I would be looking for > > information > > >>> on how to install on a *nix.) > > >> > > >> To get a different Python "in" the venv, you use the version you > > want in > > >> the construction of the venv. For example: > > >> > > >> > > >> $ python3.13 -m venv new_venv > > >> $ new_venv/bin/python --version > > >> Python 3.13.0b4 > > >> $ source new_venv/bin/activate > > >> > > >> > > > "https://peps.python.org/pep-0668/ > > PEP 668, which prevents pip from > > > interacting with the OS installed python. This change has been > > done in red > > > hat and other distros too . . . " > > > > > > similarly your first command produces and error code for the same > > reason. > > > > > > Sorry - - - not my policy - - - > > > > What? Yes, the *system* pip should have some restrictions, if it's a > > system mainly managed by a package manager. > > > > Setting up a venv is the *expected* approach to such situations, and > > creating one doesn't cause any problems. You end up with a pip in the > > activated venv that's going to install to a different path (the one > in > > the venv), and will not be marked as externally managed, as the > package > > manager has no control over that path. > > > > That's the whole point. What error are you getting? The venv > > module is > > not the pip module so restrictions on the system pip have nothing to > do > > with it. > > > > set up pyenv > > activated a venv > > trying to install python3.12 into it > > > > 1. download of python3.12 (blahblahblahetc).deb will not install > > 2. download of python3.12.tar.xz similarly will not install > > > > (venv2) memyself at devuanbigbox:~$ pip install > > /home/memyself/Downloads/Python-3.12.4.tar.xz > > Processing ./Downloads/Python-3.12.4.tar.xz > > ERROR: file:///home/memyself/Downloads/Python-3.12.4.tar.xz does not > > appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' > > found. > > > > seems that I need a different version (installable as it were) of > > python3.12 > > or my approach is all wrong! > > > you can't install Python "into" a venv. > > you use a version of Python as the base when *creating* a venv, the venv > will use the same binary as the base python (symlinks if possible, as in > the Linux case), but with different paths. > > Since you've already got pyenv, use it to build the version you want to > use - I think you said there wasn't a deb for 3.12 in your distro? > correct > That's something like > > pyenv install 3.12.4 > $ pyenv install 3.12.4 bash: pyenv: command not found > > that will use the build recipe it has... and hopefully work. Distro > Pythons sometimes have some strange setups that are hard to reproduce. > Pyenv knows how to build micropython, too, should it ever come to that. > > If you indeed found a deb for the right Python, use apt to install it, > and then use *that* Python to create your venv. > > If you have the pyenv-virtualenv plugin, you can ask it to make the > virtualenv for you, if pyenv built the Python > > pyenv is not a 'global' package there is a mountain of /root/.pyenv files though there is also quite a number of /root/.pyenv/plugins/pyenv-virtualenv/ files when looking in the /root/.pyenv files I can find options for all the older version of python but none for anything newer than what is on my system is there something else to install to achieve this 'version freedom' that pyenv promises? Regards From mats at wichmann.us Mon Aug 5 18:12:10 2024 From: mats at wichmann.us (Mats Wichmann) Date: Mon, 5 Aug 2024 16:12:10 -0600 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> <2066444d-2b5d-4b09-b1a8-8242c68591d1@wichmann.us> Message-ID: On 8/5/24 15:17, o1bigtenor via Python-list wrote: >> That's something like >> >> pyenv install 3.12.4 >> > > $ pyenv install 3.12.4 > bash: pyenv: command not found > > pyenv is not a 'global' package > > there is a mountain of /root/.pyenv files though > there is also quite a number of /root/.pyenv/plugins/pyenv-virtualenv/ > files > > when looking in the /root/.pyenv files I can find options for all the older > version of python > but none for anything newer than what is on my system > > is there something else to install to achieve this 'version freedom' that > pyenv promises? It has to go somewhere your shell can find it. Mine is a shell function, but it was set up so many years ago I don't remember details. It's presumably the pyenv installation instructions... From bill at baddogconsulting.com Mon Aug 5 18:25:43 2024 From: bill at baddogconsulting.com (Bill Deegan) Date: Mon, 5 Aug 2024 15:25:43 -0700 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> <2066444d-2b5d-4b09-b1a8-8242c68591d1@wichmann.us> Message-ID: Did Mats suggestion of: python3.13 -m venv new_venv $ new_venv/bin/python --version Python 3.13.0b4 $ source new_venv/bin/activate Not work? That should work on any system, with any system installl python. It's not trying to modify the system installed python in anyway... If not, please paste the error output you're getting. On Mon, Aug 5, 2024 at 3:13?PM Mats Wichmann via Python-list < python-list at python.org> wrote: > On 8/5/24 15:17, o1bigtenor via Python-list wrote: > > >> That's something like > >> > >> pyenv install 3.12.4 > >> > > > > $ pyenv install 3.12.4 > > bash: pyenv: command not found > > > > > pyenv is not a 'global' package > > > > there is a mountain of /root/.pyenv files though > > there is also quite a number of /root/.pyenv/plugins/pyenv-virtualenv/ > > files > > > > when looking in the /root/.pyenv files I can find options for all the > older > > version of python > > but none for anything newer than what is on my system > > > > is there something else to install to achieve this 'version freedom' that > > pyenv promises? > > It has to go somewhere your shell can find it. Mine is a shell > function, but it was set up so many years ago I don't remember details. > It's presumably the pyenv installation instructions... > > > > -- > https://mail.python.org/mailman/listinfo/python-list > From aotto1968 at t-online.de Mon Aug 5 17:19:14 2024 From: aotto1968 at t-online.de (aotto1968) Date: Mon, 5 Aug 2024 23:19:14 +0200 Subject: python C-api and thread Message-ID: hi, Is it possible to run two completely independent Python interpreters in one process, each using a thread? By independent, I mean that no data is shared between the interpreters and thus the C API can be used without any other "lock/GIL" etc. mfg From grant.b.edwards at gmail.com Mon Aug 5 22:34:05 2024 From: grant.b.edwards at gmail.com (Grant Edwards) Date: Mon, 05 Aug 2024 22:34:05 -0400 (EDT) Subject: python C-api and thread References: Message-ID: <4WdHSF10ZRznWJR@mail.python.org> On 2024-08-05, aotto1968 via Python-list wrote: > Is it possible to run two completely independent Python interpreters > in one process, each using a thread? > > By independent, I mean that no data is shared between the > interpreters and thus the C API can be used without any other > "lock/GIL" etc. No, not using any OS I've ever seen. The usual definition of "threads" is that they share data, and the definition of "processes" is that processes don't share data. How exactly does what you're trying to do differ from runnig two Python interpreters in two processes? -- Grant From rosuav at gmail.com Mon Aug 5 22:40:18 2024 From: rosuav at gmail.com (Chris Angelico) Date: Tue, 6 Aug 2024 12:40:18 +1000 Subject: python C-api and thread In-Reply-To: References: Message-ID: On Tue, 6 Aug 2024 at 08:48, aotto1968 via Python-list wrote: > > hi, > > Is it possible to run two completely independent Python interpreters in one process, each using a thread? > > By independent, I mean that no data is shared between the interpreters and thus the C API can be used without any other > "lock/GIL" etc. > You're probably thinking of subinterpreters: https://peps.python.org/pep-0734/ ChrisA From bill at baddogconsulting.com Mon Aug 5 23:36:12 2024 From: bill at baddogconsulting.com (Bill Deegan) Date: Mon, 5 Aug 2024 20:36:12 -0700 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> <2066444d-2b5d-4b09-b1a8-8242c68591d1@wichmann.us> Message-ID: why reply to me instead of to the list? It's generally considered bad form to do so. Do you have any python 3 installed on your system? Or python 2.7? If not, can you install such via system package? -Bill On Mon, Aug 5, 2024 at 6:06?PM o1bigtenor wrote: > > > On Mon, Aug 5, 2024 at 5:28?PM Bill Deegan via Python-list < > python-list at python.org> wrote: > >> Did Mats suggestion of: >> python3.13 -m venv new_venv >> $ new_venv/bin/python --version >> Python 3.13.0b4 >> $ source new_venv/bin/activate >> >> Not work? >> That should work on any system, with any system installl python. >> It's not trying to modify the system installed python in anyway... >> >> If not, please paste the error output you're getting. >> > > # python3.13 -m venv new_venv > -bash: python3.13: command not found > > $ python3.13 -m venv new_venv > bash: python3.13: command not found > > There you have it - - - the first one run as superuser and the second as > usr. > > Regards > > > From contact at piperswe.me Mon Aug 5 21:49:07 2024 From: contact at piperswe.me (Piper McCorkle) Date: Mon, 05 Aug 2024 20:49:07 -0500 Subject: Issue bootstrapping Python - troubleshooting steps? Message-ID: Hi! I'm working on a Linux From Scratch sort of system, and part of that is bootstrapping Python. I'm running into an error message in the compilation though - could anyone help me with next steps on troubleshooting the error? Error: > ./_bootstrap_python /tmp/sources/Python-3.12.4/Programs/_freeze_module.py abc /tmp/sources/Python-3.12.4/Lib/abc.py Python/frozen_modules/abc.h > Fatal Python error: init_import_site: Failed to import the site module > Python runtime state: initialized > Traceback (most recent call last): > File "/tmp/sources/Python-3.12.4/Lib/site.py", line 80, in > PREFIXES = [sys.prefix, sys.exec_prefix] > ^^^^^^^^^^ > AttributeError: module 'sys' has no attribute 'prefix' > make[2]: *** [Makefile:1329: Python/frozen_modules/abc.h] Error 1 I'm essentially trying to build Python with the following commands: $ cd /tmp/build/Python $ /tmp/sources/Python-3.12.4/configure --enable-shared --with-system-expat --enable-optimizations --prefix= $ make $ make install I'm building Python 3.12.4. $ sha256sum sources/Python-3.12.4.tar.xz f6d419a6d8743ab26700801b4908d26d97e8b986e14f95de31b32de2b0e79554 sources/Python-3.12.4.tar.xz I've attached a complete build log. If you need any more information in order to help me, please feel free to ask! I'd appreciate if you can CC me on any replies, so that they end up in my inbox instead of in the mailing list digest. Piper McCorkle (https://piperswe.me) contact at piperswe.me | +1 (508) 493-8615 From o1bigtenor at gmail.com Tue Aug 6 08:23:39 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Tue, 6 Aug 2024 07:23:39 -0500 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> <2066444d-2b5d-4b09-b1a8-8242c68591d1@wichmann.us> Message-ID: On Mon, Aug 5, 2024 at 10:36?PM Bill Deegan wrote: > why reply to me instead of to the list? > It's generally considered bad form to do so. > Got it - - - except this list wants only reply all the next one wants only reply and keeping straight which is which isn't always happening. I did apologize and asked you to advise in the next one whether you even wanted to be included (which you haven't responded to). > > > Do you have any python 3 installed on your system? > Or python 2.7? > If not, can you install such via system package? > # dpkg -l | grep python* ii 2to3 3.11.2-1 all 2to3 binary using python3 ii idle-python3.11 3.11.2-6+deb12u2 all IDE for Python (v3.11) using Tkinter ii ipython3 8.5.0-4 all Enhanced interactive Python 3 shell ii libboost-python1.74.0 1.74.0+ds1-21 amd64 Boost.Python Library ii libpython3-all-dev:amd64 3.11.2-1+b1 amd64 package depending on all supported Python 3 development packages ii libpython3-dev:amd64 3.11.2-1+b1 amd64 header files and a static library for Python (default) ii libpython3-stdlib:amd64 3.11.2-1+b1 amd64 interactive high-level object-oriented language (default python3 version) rc libpython3.10-minimal:amd64 3.10.9-1 amd64 Minimal subset of the Python language (version 3.10) ii libpython3.11:amd64 3.11.2-6+deb12u2 amd64 Shared Python runtime library (version 3.11) ii libpython3.11-dev:amd64 3.11.2-6+deb12u2 amd64 Header files and a static library for Python (v3.11) ii libpython3.11-minimal:amd64 3.11.2-6+deb12u2 amd64 Minimal subset of the Python language (version 3.11) ii libpython3.11-stdlib:amd64 3.11.2-6+deb12u2 amd64 Interactive high-level object-oriented language (standard library, version 3.11) ii libpython3.11-testsuite 3.11.2-6+deb12u2 all Testsuite for the Python standard library (v3.11) ii libpython3.9-minimal:amd64 3.9.13-1 amd64 Minimal subset of the Python language (version 3.9) ii libpython3.9-stdlib:amd64 3.9.13-1 amd64 Interactive high-level object-oriented language (standard library, version 3.9) ii python-apsw-doc 3.40.0.0-2 all documentation for python-apsw ii python-apt-common 2.6.0 all Python interface to libapt-pkg (locales) ii python-apt-common-devuan 2.5.3devuan2 all Templates for aptitude ii python-attr-doc 22.2.0-1 all documentation for the attrs Python library ii python-babel-localedata 2.10.3-1 all tools for internationalizing Python applications - locale data files ii python-cryptography-doc 38.0.4-3 all Python library exposing cryptographic recipes and primitives (documentation) ii python-cycler-doc 0.11.0-1 all composable kwarg iterator (documentation) ii python-gmpy2-common 2.1.2-2 all common files for python3-gmpy2 ii python-ipython-doc 8.5.0-4 all Enhanced interactive Python shell (documentation) ii python-markdown-doc 3.4.1-2 all text-to-HTML conversion library/tool (documentation) ii python-matplotlib-data 3.6.3-1 all Python based plotting system (data package) ii python-matplotlib-doc 3.5.2-4 all Python based plotting system (documentation package) ii python-mpmath-doc 1.2.1-2 all library for arbitrary-precision floating-point arithmetic - Documentation ii python-numpy-doc 1:1.23.5-2 all NumPy documentation ii python-pexpect-doc 4.8.0-4 all Python module for automating interactive applications (documentation) ii python-pil-doc 9.4.0-1.1+deb12u1 all Examples for the Python Imaging Library ii python-pygments-doc 2.14.0+dfsg-1 all documentation for the Pygments ii python-scipy-doc 1.10.1-2 all scientific library for Python - documentation ii python-sympy-doc 1.11.1-1 all Computer Algebra System (CAS) in Python - Documentation ii python-webob-doc 1:1.8.6-3 all Python module providing WSGI request and response objects (documentation) ii python3 3.11.2-1+b1 amd64 interactive high-level object-oriented language (default python3 version) ii python3-all 3.11.2-1+b1 amd64 package depending on all supported Python 3 runtime versions ii python3-all-dev 3.11.2-1+b1 amd64 package depending on all supported Python 3 development packages ii python3-anyio 3.6.2-1 all Asynchronous compatibility layer (Python 3) ii python3-appdirs 1.4.4-3 all determining appropriate platform-specific directories (Python 3) ii python3-apsw 3.40.0.0-2+b1 amd64 another Python SQLite 3 wrapper (Python 3 version) ii python3-apt 2.6.0 amd64 Python 3 interface to libapt-pkg ii python3-argcomplete 2.0.0-1 all bash tab completion for argparse (for Python 3) ii python3-asttokens 2.2.1-1 all annotate Python asbtract syntax trees with code references (Python 3) ii python3-async-generator 1.10-4 all extensions to asynchronous generators for Python3 ii python3-async-timeout 4.0.2-1 all timeout context manager for asyncio programs in Python ii python3-attr 22.2.0-1 all Attributes without boilerplate (Python 3) ii python3-babel 2.10.3-1 all tools for internationalizing Python applications - Python 3.x ii python3-backcall 0.2.0-4 all Callback functions for Python ii python3-beniget 0.4.1-3 all collection of compile-time Python AST analyzers ii python3-blinker 1.5-1 all Fast, simple object-to-object and broadcast signaling (Python3) ii python3-brlapi:amd64 6.5-7+deb12u1 amd64 Braille display access via BRLTTY - Python3 bindings ii python3-brotli 1.0.9-2+b6 amd64 lossless compression algorithm and format (Python 3 version) ii python3-bs4 4.11.2-2 all error-tolerant HTML parser for Python 3 ii python3-cairo:amd64 1.20.1-5+b1 amd64 Python3 bindings for the Cairo vector graphics library ii python3-cairocffi 1.4.0-1 all cffi-based cairo bindings for Python (Python3) ii python3-certifi 2022.9.24-1 all root certificates for validating SSL certs and verifying TLS hosts (python3) ii python3-cffi 1.15.1-5 all Foreign Function Interface for Python 3 calling C code ii python3-cffi-backend:amd64 1.15.1-5+b1 amd64 Foreign Function Interface for Python 3 calling C code - runtime ii python3-chardet 5.1.0+dfsg-2 all Universal Character Encoding Detector (Python3) ii python3-charset-normalizer 3.0.1-2 all charset, encoding and language detection (Python 3) ii python3-chm 0.8.6-3+b4 amd64 Python binding for CHMLIB - Python 3 ii python3-click 8.1.3-2 all Wrapper around optparse for command line utilities - Python 3.x ii python3-colorama 0.4.6-2 all Cross-platform colored terminal text in Python - Python 3.x ii python3-contourpy 1.0.7-1+b1 amd64 Python library for calculating contours of 2D quadrilateral grids ii python3-cryptography 38.0.4-3 amd64 Python library exposing cryptographic recipes and primitives (Python 3) ii python3-cryptography-vectors 38.0.4-1 all Test vectors for python-cryptography (Python 3) ii python3-css-parser 1.0.8-1 all CSS related utilities (parsing, serialization, etc) for Python 3 ii python3-cssselect 1.2.0-2 all cssselect parses CSS3 Selectors and translates them to XPath 1.0 ii python3-cups:amd64 2.0.1-5+b4 amd64 Python3 bindings for CUPS ii python3-cupshelpers 1.5.18-1 all Python utility modules around the CUPS printing system ii python3-cycler 0.11.0-1 all composable kwarg iterator (Python 3) ii python3-dateutil 2.8.2-2 all powerful extensions to the standard Python 3 datetime module ii python3-dbus 1.3.2-4+b1 amd64 simple interprocess messaging system (Python 3 interface) ii python3-debconf 1.5.82 all interact with debconf from Python 3 ii python3-debian 0.1.49 all Python 3 modules to work with Debian-related data formats ii python3-debianbts 4.0.1 all Python interface to Debian's Bug Tracking System ii python3-decorator 5.1.1-3 all simplify usage of Python decorators by programmers ii python3-dev 3.11.2-1+b1 amd64 header files and a static library for Python (default) ii python3-distro 1.8.0-1 all Linux OS platform information API ii python3-distutils 3.11.2-3 all distutils package for Python 3.x ii python3-dnspython 2.3.0-1 all DNS toolkit for Python 3 ii python3-doc 3.11.2-1 all documentation for the high-level object-oriented language Python 3 ii python3-ecdsa 0.19.0-2 all ECDSA cryptographic signature library (Python 3) ii python3-enchant 3.2.2-1 all spellchecking library for Python 3 ii python3-examples 3.11.2-1 all examples for the Python language (default version) ii python3-exceptiongroup 1.1.0-1 all Backport of PEP 654 (exception groups) ii python3-executing 1.2.0-2 all Inspect Python AST node being executed ii python3-feedparser 6.0.10-1 all Universal Feed Parser for Python 3 ii python3-fonttools 4.38.0-1+b1 amd64 Converts OpenType and TrueType fonts to and from XML (Python 3 Library) ii python3-fs 2.4.16-2 all Python filesystem abstraction ii python3-full 3.11.2-1+b1 amd64 Default Python Interpreter with complete class library ii python3-gast 0.5.2-2 all compatibility layer for the AST of various Python versions (Python3 version) ii python3-gdbm:amd64 3.11.2-3 amd64 GNU dbm database support for Python 3.x ii python3-gdbm-dbg:amd64 3.11.2-3 amd64 GNU dbm database support for Python 3.x (debug extension) ii python3-gi 3.42.2-3+b1 amd64 Python 3 bindings for gobject-introspection libraries ii python3-gi-cairo 3.42.2-3+b1 amd64 Python 3 Cairo bindings for the GObject library ii python3-gmpy2 2.1.2-2+b1 amd64 interfaces GMP to Python 3 for fast, unbound-precision computations ii python3-h11 0.14.0-1 all Pure-Python, bring-your-own-I/O implementation of HTTP/1.1 (Python 3) ii python3-h2 4.1.0-4 all Pure-Python3 HTTP/2 State-Machine based protocol implementation in Python ii python3-hpack 4.0.0-2 all Pure-Python3 HTTP/2 header encoding (HPACK) ii python3-html2text 2020.1.16-2 all Python module for converting HTML to Markdown text (Python3 version) ii python3-html5-parser 0.4.10-8+b1 amd64 fast, standards compliant, C based, HTML 5 parser for python ii python3-html5lib 1.1-3 all HTML parser/tokenizer based on the WHATWG HTML5 specification ii python3-httpcore 0.16.3-1 all minimal low-level HTTP client ii python3-httplib2 0.20.4-3 all comprehensive HTTP client library written for Python3 ii python3-httpx 0.23.3-1 all next generation HTTP client ii python3-hyperframe 6.0.0-1 all Pure-Python3 HTTP/2 framing code ii python3-idna 3.3-1+deb12u1 all Python IDNA2008 (RFC 5891) handling (Python 3) ii python3-ifaddr 0.1.7-2 all Pure Python implementation for detecting IP addresses ii python3-importlib-metadata 4.12.0-1 all library to access the metadata for a Python package - Python 3.x ii python3-iniconfig 1.1.1-2 all brain-dead simple parsing of ini files ii python3-intelhex 2.3.0-3 all Python support for Intel HEX (Python3) ii python3-ipython 8.5.0-4 all Enhanced interactive Python shell (Python 3 version) ii python3-jedi 0.18.2-1 all autocompletion tool for Python 3 ii python3-jeepney 0.8.0-3 all pure Python D-Bus interface ii python3-jinja2 3.1.2-1 all small but fast and easy to use stand-alone template engine ii python3-joblib 1.2.0-4 all tools to provide lightweight pipelining in Python ii python3-jwt 2.6.0-1 all Python 3 implementation of JSON Web Token ii python3-kiwisolver 1.4.4-1+b1 amd64 fast implementation of the Cassowary constraint solver - Python 3.X ii python3-lazr.restfulclient 0.14.5-1 all client for lazr.restful-based web services (Python 3) ii python3-lazr.uri 1.0.6-3 all library for parsing, manipulating, and generating URIs ii python3-ledger 3.3.0-3 amd64 command-line double-entry accounting program (python3 extension) ii python3-lib2to3 3.11.2-3 all Interactive high-level object-oriented language (lib2to3) ii python3-libevdev 0.5-3 all Python 3 wrapper for libevdev ii python3-livereload 2.6.3-2 all automatic browser refresher (Python 3) ii python3-louis 3.24.0-1 all Python bindings for liblouis ii python3-lunr 0.6.2-2 all Python implementation of Lunr.js (Python3 version) ii python3-lxml:amd64 4.9.2-1+b1 amd64 pythonic binding for the libxml2 and libxslt libraries ii python3-lz4 4.0.2+dfsg-1+b2 amd64 Python interface to the lz4 compression library (Python 3) ii python3-markdown 3.4.1-2 all text-to-HTML conversion library/tool (Python 3 version) ii python3-markdown-it 2.1.0-5 all Python port of markdown-it and some its associated plugins ii python3-markupsafe 2.1.2-1+b1 amd64 HTML/XHTML/XML string library ii python3-matplotlib 3.6.3-1+b1 amd64 Python based plotting system in a style similar to Matlab (Python 3) ii python3-matplotlib-inline 0.1.6-2 all Matplotlib backend for inline use in IPython and Jupyter ii python3-mdurl 0.1.2-1 all Python port of the JavaScript mdurl package ii python3-mechanize 1:0.4.8+pypi-5 all stateful programmatic web browsing ii python3-mergedeep 1.3.4-3 all Deep merge function for Python (Python3 version) ii python3-minimal 3.11.2-1+b1 amd64 minimal subset of the Python language (default python3 version) ii python3-more-itertools 8.10.0-2 all library with routines for operating on iterables, beyond itertools (Python 3) ii python3-mpmath 1.2.1-2 all library for arbitrary-precision floating-point arithmetic (Python3) ii python3-msgpack 1.0.3-2+b1 amd64 Python 3 implementation of MessagePack format ii python3-munkres 1.1.4-3 all munkres algorithm for the Assignment Problem - Python 3 library ii python3-mutagen 1.46.0-1 all audio metadata editing library (Python 3) ii python3-netifaces:amd64 0.11.0-2+b1 amd64 portable network interface information - Python 3.x ii python3-nltk 3.8-1 all Python3 libraries for natural language processing ii python3-numpy 1:1.24.2-1 amd64 Fast array facility to the Python 3 language ii python3-oauthlib 3.2.2-1 all generic, spec-compliant implementation of OAuth for Python3 ii python3-olefile 0.46-3 all Python module to read/write MS OLE2 files ii python3-openssl 23.0.0-1 all Python 3 wrapper around the OpenSSL library ii python3-outcome 1.2.0-1 all capture the outcome of Python function calls ii python3-packaging 23.0-1 all core utilities for python3 packages ii python3-parso 0.8.3-1 all Python parser that supports error recovery - Python 3.X ii python3-paste 3.5.2+repack-1 all tools for using a Web Server Gateway Interface stack - Python 3.x ii python3-pexpect 4.8.0-4 all Python 3 module for automating interactive applications ii python3-pickleshare 0.7.5-5 all File system based database that uses Python pickles for Python 3 ii python3-pil:amd64 9.4.0-1.1+deb12u1 amd64 Python Imaging Library (Python3) ii python3-pil.imagetk:amd64 9.4.0-1.1+deb12u1 amd64 Python Imaging Library - ImageTk Module (Python3) ii python3-pip 23.0.1+dfsg-1 all Python package installer ii python3-pip-whl 23.0.1+dfsg-1 all Python package installer (pip wheel) ii python3-pkg-resources 66.1.1-1 all Package Discovery and Resource Access using pkg_resources ii python3-pluggy 1.0.0+repack-1 all plugin and hook calling mechanisms for Python - 3.x ii python3-ply 3.11-5 all Lex and Yacc implementation for Python3 ii python3-prompt-toolkit 3.0.36-2 all library for building interactive command lines (Python 3) ii python3-psutil 5.9.4-1+b1 amd64 module providing convenience functions for managing processes (Python3) ii python3-psycopg2 2.9.5-1+b1 amd64 Python 3 module for PostgreSQL ii python3-ptyprocess 0.7.0-5 all Run a subprocess in a pseudo terminal from Python 3 ii python3-pure-eval 0.2.2-1 all Safely evaluate Python AST nodes without side effects ii python3-py 1.11.0-1 all Advanced Python development support library (Python 3) ii python3-py7zr 0.11.3+dfsg-5 amd64 pure Python 7-zip library ii python3-pyatspi 2.46.0-2 all Assistive Technology Service Provider Interface - Python3 bindings ii python3-pycparser 2.21-1 all C parser in Python 3 ii python3-pycryptodome 3.11.0+dfsg1-4 amd64 cryptographic Python library (Python 3) ii python3-pycurl 7.45.2-3 amd64 Python bindings to libcurl (Python 3) ii python3-pygments 2.14.0+dfsg-1 all syntax highlighting package written in Python 3 ii python3-pyinotify 0.9.6-2 all simple Linux inotify Python bindings ii python3-pyparsing 3.0.9-1 all alternative to creating and executing simple grammars - Python 3.x ii python3-pyqt5 5.15.9+dfsg-1 amd64 Python 3 bindings for Qt5 ii python3-pyqt5.qtchart 5.15.6+dfsg-1 amd64 Python 3 bindings for Qt5's Charts module ii python3-pyqt5.qtmultimedia 5.15.9+dfsg-1 amd64 Python 3 bindings for Qt5's Multimedia module ii python3-pyqt5.qtopengl 5.15.9+dfsg-1 amd64 Python 3 bindings for Qt5's OpenGL module ii python3-pyqt5.qtpositioning 5.15.9+dfsg-1 amd64 Python 3 bindings for QtPositioning module ii python3-pyqt5.qtquick 5.15.9+dfsg-1 amd64 Python 3 bindings for QtQuick module ii python3-pyqt5.qtremoteobjects 5.15.9+dfsg-1 amd64 Python 3 bindings for Qt5's RemoteObjects module ii python3-pyqt5.qtsensors 5.15.9+dfsg-1 amd64 Python 3 bindings for QtSensors module ii python3-pyqt5.qtserialport 5.15.9+dfsg-1 amd64 Python 3 bindings for QtSerialPort module ii python3-pyqt5.qtsql 5.15.9+dfsg-1 amd64 Python 3 bindings for Qt5's SQL module ii python3-pyqt5.qtsvg 5.15.9+dfsg-1 amd64 Python 3 bindings for Qt5's SVG module ii python3-pyqt5.qttexttospeech 5.15.9+dfsg-1 amd64 Python 3 bindings for QtSpeech module ii python3-pyqt5.qtwebchannel 5.15.9+dfsg-1 amd64 Python 3 bindings for Qt5's WebChannel module ii python3-pyqt5.qtwebengine 5.15.6-1 amd64 Python 3 bindings for Qt5's WebEngine module ii python3-pyqt5.qtwebkit 5.15.9+dfsg-1 amd64 Python 3 bindings for Qt5's WebKit module ii python3-pyqt5.qtwebsockets 5.15.9+dfsg-1 amd64 Python 3 bindings for Qt5's WebSockets module ii python3-pyqt5.qtxmlpatterns 5.15.9+dfsg-1 amd64 Python 3 bindings for Qt5's XmlPatterns module ii python3-pyqt5.sip 12.11.1-1 amd64 runtime module for Python extensions using SIP ii python3-pyqt6 6.4.2-1 amd64 Python bindings for Qt 6 ii python3-pyqt6.qtqml 6.4.2-1 amd64 Python bindings for Qt 6 QML module ii python3-pyqt6.qtquick 6.4.2-1 amd64 Python bindings for Qt 6 Quick module ii python3-pyqt6.qtsvg 6.4.2-1 amd64 Python bindings for Qt 6 SVG module ii python3-pyqt6.qtwebchannel 6.4.2-1 amd64 Python bindings for Qt 6 WebChannel module ii python3-pyqt6.qtwebengine 6.4.0-1 amd64 Python bindings for the Qt 6 WebEngine framework ii python3-pyqt6.sip 13.4.1-1 amd64 runtime module for Python extensions using SIP ii python3-pysimplesoap 1.16.2-5 all simple and lightweight SOAP Library (Python 3) ii python3-pytest 7.2.1-2 all Simple, powerful testing in Python3 ii python3-pythran 0.11.0+ds-7 amd64 ahead of time compiler for Python ii python3-pyudev 0.24.0-1 all Python3 bindings for libudev ii python3-pyxattr:amd64 0.8.1-1 amd64 module for manipulating filesystem extended attributes (Python3) ii python3-pyyaml-env-tag 0.1-3 all Custom YAML tag for referencing environment variables (Python3 version) ii python3-qtpy 2.3.0-1 all Abstraction layer for PySide2/PySide6/PyQt5/PyQt6 (Python 3) ii python3-regex 0.1.20221031-1+b1 amd64 alternative regular expression module (Python 3) ii python3-reportbug 12.0.0devuan2 all Python modules for interacting with bug tracking systems ii python3-repoze.lru 0.7-3 all tiny LRU cache implementation and decorator for Python 3 ii python3-requests 2.28.1+dfsg-1 all elegant and simple HTTP library for Python3, built for human beings ii python3-requests-toolbelt 0.10.1-1 all Utility belt for advanced users of python3-requests ii python3-rfc3986 1.5.0-2 all validating URI references per RFC 3986 - Python 3.x ii python3-rich 13.3.1-1 all render rich text, tables, progress bars, syntax highlighting, markdown and more ii python3-routes 2.5.1-3 all Routing Recognition and Generation Tools for Python 3 ii python3-scipy 1.10.1-2 amd64 scientific tools for Python 3 ii python3-serial 3.5-2 all pyserial - module encapsulating access for the serial port ii python3-setuptools 66.1.1-1 all Python3 Distutils Enhancements ii python3-setuptools-whl 66.1.1-1 all Python Distutils Enhancements (wheel package) ii python3-sgmllib3k 1.0.0-4 all Python 3 port of Python 2's sgmllib ii python3-simplejson 3.18.3-1 amd64 simple, fast, extensible JSON encoder/decoder for Python 3.x ii python3-sip 4.19.25+dfsg-5+b1 amd64 Python 3/C++ bindings generator runtime library ii python3-sipbuild 6.7.7+dfsg-1 amd64 Python bindings generator for C/C++ libraries ? the build system ii python3-six 1.16.0-4 all Python 2 and 3 compatibility library ii python3-smbc 1.0.23-2+b4 amd64 Python 3 bindings for the Samba client library ii python3-sniffio 1.2.0-1 all detect which async Python library is in use ii python3-software-properties 0.99.30-4.1~deb12u1 all manage the repositories that you install software from ii python3-sortedcontainers 2.4.0-2 all sorted container types: SortedList, SortedDict, and SortedSet (Python 3) ii python3-soupsieve 2.3.2-1 all modern CSS selector implementation for BeautifulSoup (Python 3) ii python3-speechd 0.11.4-2 all Python interface to Speech Dispatcher ii python3-stack-data 0.6.2-3 all Better tracebacks for Python ii python3-sugar3 0.120-1 all Sugar Learning Platform - toolkit Python3 bindings ii python3-sympy 1.11.1-1 all Computer Algebra System (CAS) in Python (Python 3) ii python3-tempita 0.5.2-7 all very small text templating language - Python 3.x ii python3-texttable 1.6.7-1 all Module for creating simple ASCII tables ? python3 ii python3-tk:amd64 3.11.2-3 amd64 Tkinter - Writing Tk applications with Python 3.x ii python3-tk-dbg:amd64 3.11.2-3 amd64 Tkinter - Writing Tk applications with Python 3.x (debug extension) ii python3-toml 0.10.2-1 all library for Tom's Obvious, Minimal Language - Python 3.x ii python3-tomli 2.0.1-2 all lil' TOML parser for Python ii python3-tornado 6.2.0-3 amd64 scalable, non-blocking web server and tools - Python 3 package ii python3-tqdm 4.64.1-1 all fast, extensible progress bar for Python 3 and CLI tool ii python3-traitlets 5.5.0-1 all Lightweight Traits-like package for Python 3 ii python3-trio 0.22.0-0.2 all Python async concurrency and I/O library ii python3-typing-extensions 4.4.0-1 all Backported and Experimental Type Hints for Python ii python3-tz 2022.7.1-4 all Python3 version of the Olson timezone database ii python3-ufolib2 0.14.0+dfsg1-1 all Unified Font Object (UFO) fonts library ii python3-unicodedata2 14.0.0+ds2-1+b2 amd64 Python unicodedata backport/updates ii python3-uno 4:7.4.7-1+deb12u4 amd64 Python-UNO bridge ii python3-unrardll 0.1.5-6+b1 amd64 Python wrapper for the unrar shared library ii python3-urllib3 1.26.12-1 all HTTP library with thread-safe connection pooling for Python3 ii python3-userpath 1.8.0-1 all tool for adding locations to the user PATH - Python3 library ii python3-venv 3.11.2-1+b1 amd64 venv module for python3 (default python3 version) ii python3-wadllib 1.3.6-4 all Python 3 library for navigating WADL files ii python3-watchdog 2.2.1-1 all Python API and shell utilities to monitor file system events ii python3-wcwidth 0.2.5+dfsg1-1.1 all determine printable width of a string on a terminal ii python3-webencodings 0.5.1-5 all Python implementation of the WHATWG Encoding standard ii python3-webob 1:1.8.6-3 all Python module providing WSGI request and response objects (Python 3) ii python3-websockets 10.4-1 all implementation of the WebSocket Protocol (RFC 6455) ii python3-wheel 0.38.4-2 all built-package format for Python ii python3-wxgtk4.0 4.2.0+dfsg-3 amd64 Python 3 interface to the wxWidgets Cross-platform C++ GUI toolkit ii python3-xcffib 0.11.1-4 all CFFI-based Python binding for X ii python3-xdg 0.28-2 all Python 3 library to access freedesktop.org standards ii python3-yaml 6.0-3+b2 amd64 YAML parser and emitter for Python3 ii python3-zeroconf 0.47.3-1 all Pure Python implementation of multicast DNS service discovery (Python3) ii python3-zipp 1.0.0-6 all pathlib-compatible Zipfile object wrapper - Python 3.x rc python3.10-minimal 3.10.9-1 amd64 Minimal subset of the Python language (version 3.10) rc python3.10-venv 3.10.9-1 amd64 Interactive high-level object-oriented language (pyvenv binary, version 3.10) ii python3.11 3.11.2-6+deb12u2 amd64 Interactive high-level object-oriented language (version 3.11) ii python3.11-dev 3.11.2-6+deb12u2 amd64 Header files and a static library for Python (v3.11) ii python3.11-doc 3.11.2-6+deb12u2 all Documentation for the high-level object-oriented language Python (v3.11) ii python3.11-examples 3.11.2-6+deb12u2 all Examples for the Python language (v3.11) ii python3.11-full 3.11.2-6+deb12u2 amd64 Python Interpreter with complete class library (version 3.11) ii python3.11-minimal 3.11.2-6+deb12u2 amd64 Minimal subset of the Python language (version 3.11) ii python3.11-venv 3.11.2-6+deb12u2 amd64 Interactive high-level object-oriented language (pyvenv binary, version 3.11) ii python3.9 3.9.13-1 amd64 Interactive high-level object-oriented language (version 3.9) ii python3.9-doc 3.9.13-1 all Documentation for the high-level object-oriented language Python (v3.9) ii python3.9-minimal 3.9.13-1 amd64 Minimal subset of the Python language (version 3.9) rc python3.9-venv 3.9.13-1 amd64 Interactive high-level object-oriented language (pyvenv binary, version 3.9) since there seems to be some doubt I included the whole list Regards From bill at baddogconsulting.com Tue Aug 6 11:53:20 2024 From: bill at baddogconsulting.com (Bill Deegan) Date: Tue, 6 Aug 2024 08:53:20 -0700 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> <2066444d-2b5d-4b09-b1a8-8242c68591d1@wichmann.us> Message-ID: I?m not looking through all the packages you have installed What version of python is installed on your system? On Tue, Aug 6, 2024 at 5:24?AM o1bigtenor wrote: > > > On Mon, Aug 5, 2024 at 10:36?PM Bill Deegan > wrote: > >> why reply to me instead of to the list? >> It's generally considered bad form to do so. >> > > Got it - - - except this list wants only reply all the next one wants only > reply and > keeping straight which is which isn't always happening. I did apologize > and asked > you to advise in the next one whether you even wanted to be included > (which you haven't > responded to). > >> >> >> Do you have any python 3 installed on your system? >> Or python 2.7? >> If not, can you install such via system package? >> > > > # dpkg -l | grep python* > ii 2to3 3.11.2-1 > all 2to3 binary using python3 > ii idle-python3.11 3.11.2-6+deb12u2 > all IDE for Python (v3.11) using Tkinter > ii ipython3 8.5.0-4 > all Enhanced interactive Python 3 shell > ii libboost-python1.74.0 1.74.0+ds1-21 > amd64 Boost.Python Library > ii libpython3-all-dev:amd64 3.11.2-1+b1 > amd64 package depending on all supported Python 3 > development packages > ii libpython3-dev:amd64 3.11.2-1+b1 > amd64 header files and a static library for Python > (default) > ii libpython3-stdlib:amd64 3.11.2-1+b1 > amd64 interactive high-level object-oriented language > (default python3 version) > rc libpython3.10-minimal:amd64 3.10.9-1 > amd64 Minimal subset of the Python language (version > 3.10) > ii libpython3.11:amd64 3.11.2-6+deb12u2 > amd64 Shared Python runtime library (version 3.11) > ii libpython3.11-dev:amd64 3.11.2-6+deb12u2 > amd64 Header files and a static library for Python > (v3.11) > ii libpython3.11-minimal:amd64 3.11.2-6+deb12u2 > amd64 Minimal subset of the Python language (version > 3.11) > ii libpython3.11-stdlib:amd64 3.11.2-6+deb12u2 > amd64 Interactive high-level object-oriented language > (standard library, version 3.11) > ii libpython3.11-testsuite 3.11.2-6+deb12u2 > all Testsuite for the Python standard library (v3.11) > ii libpython3.9-minimal:amd64 3.9.13-1 > amd64 Minimal subset of the Python language (version > 3.9) > ii libpython3.9-stdlib:amd64 3.9.13-1 > amd64 Interactive high-level object-oriented language > (standard library, version 3.9) > ii python-apsw-doc 3.40.0.0-2 > all documentation for python-apsw > ii python-apt-common 2.6.0 > all Python interface to libapt-pkg (locales) > ii python-apt-common-devuan 2.5.3devuan2 > all Templates for aptitude > ii python-attr-doc 22.2.0-1 > all documentation for the attrs Python library > ii python-babel-localedata 2.10.3-1 > all tools for internationalizing Python applications > - locale data files > ii python-cryptography-doc 38.0.4-3 > all Python library exposing cryptographic recipes > and primitives (documentation) > ii python-cycler-doc 0.11.0-1 > all composable kwarg iterator (documentation) > ii python-gmpy2-common 2.1.2-2 > all common files for python3-gmpy2 > ii python-ipython-doc 8.5.0-4 > all Enhanced interactive Python shell (documentation) > ii python-markdown-doc 3.4.1-2 > all text-to-HTML conversion library/tool > (documentation) > ii python-matplotlib-data 3.6.3-1 > all Python based plotting system (data package) > ii python-matplotlib-doc 3.5.2-4 > all Python based plotting system (documentation > package) > ii python-mpmath-doc 1.2.1-2 > all library for arbitrary-precision floating-point > arithmetic - Documentation > ii python-numpy-doc 1:1.23.5-2 > all NumPy documentation > ii python-pexpect-doc 4.8.0-4 > all Python module for automating interactive > applications (documentation) > ii python-pil-doc 9.4.0-1.1+deb12u1 > all Examples for the Python Imaging Library > ii python-pygments-doc 2.14.0+dfsg-1 > all documentation for the Pygments > ii python-scipy-doc 1.10.1-2 > all scientific library for Python - documentation > ii python-sympy-doc 1.11.1-1 > all Computer Algebra System (CAS) in Python - > Documentation > ii python-webob-doc 1:1.8.6-3 > all Python module providing WSGI request and response > objects (documentation) > ii python3 3.11.2-1+b1 > amd64 interactive high-level object-oriented language > (default python3 version) > ii python3-all 3.11.2-1+b1 > amd64 package depending on all supported Python 3 > runtime versions > ii python3-all-dev 3.11.2-1+b1 > amd64 package depending on all supported Python 3 > development packages > ii python3-anyio 3.6.2-1 > all Asynchronous compatibility layer (Python 3) > ii python3-appdirs 1.4.4-3 > all determining appropriate platform-specific > directories (Python 3) > ii python3-apsw 3.40.0.0-2+b1 > amd64 another Python SQLite 3 wrapper (Python 3 version) > ii python3-apt 2.6.0 > amd64 Python 3 interface to libapt-pkg > ii python3-argcomplete 2.0.0-1 > all bash tab completion for argparse (for Python 3) > ii python3-asttokens 2.2.1-1 > all annotate Python asbtract syntax trees with code > references (Python 3) > ii python3-async-generator 1.10-4 > all extensions to asynchronous generators for Python3 > ii python3-async-timeout 4.0.2-1 > all timeout context manager for asyncio programs in > Python > ii python3-attr 22.2.0-1 > all Attributes without boilerplate (Python 3) > ii python3-babel 2.10.3-1 > all tools for internationalizing Python applications > - Python 3.x > ii python3-backcall 0.2.0-4 > all Callback functions for Python > ii python3-beniget 0.4.1-3 > all collection of compile-time Python AST analyzers > ii python3-blinker 1.5-1 > all Fast, simple object-to-object and broadcast > signaling (Python3) > ii python3-brlapi:amd64 6.5-7+deb12u1 > amd64 Braille display access via BRLTTY - Python3 > bindings > ii python3-brotli 1.0.9-2+b6 > amd64 lossless compression algorithm and format > (Python 3 version) > ii python3-bs4 4.11.2-2 > all error-tolerant HTML parser for Python 3 > ii python3-cairo:amd64 1.20.1-5+b1 > amd64 Python3 bindings for the Cairo vector graphics > library > ii python3-cairocffi 1.4.0-1 > all cffi-based cairo bindings for Python (Python3) > ii python3-certifi 2022.9.24-1 > all root certificates for validating SSL certs and > verifying TLS hosts (python3) > ii python3-cffi 1.15.1-5 > all Foreign Function Interface for Python 3 calling > C code > ii python3-cffi-backend:amd64 1.15.1-5+b1 > amd64 Foreign Function Interface for Python 3 calling C > code - runtime > ii python3-chardet 5.1.0+dfsg-2 > all Universal Character Encoding Detector (Python3) > ii python3-charset-normalizer 3.0.1-2 > all charset, encoding and language detection (Python > 3) > ii python3-chm 0.8.6-3+b4 > amd64 Python binding for CHMLIB - Python 3 > ii python3-click 8.1.3-2 > all Wrapper around optparse for command line > utilities - Python 3.x > ii python3-colorama 0.4.6-2 > all Cross-platform colored terminal text in Python - > Python 3.x > ii python3-contourpy 1.0.7-1+b1 > amd64 Python library for calculating contours of 2D > quadrilateral grids > ii python3-cryptography 38.0.4-3 > amd64 Python library exposing cryptographic recipes > and primitives (Python 3) > ii python3-cryptography-vectors 38.0.4-1 > all Test vectors for python-cryptography (Python 3) > ii python3-css-parser 1.0.8-1 > all CSS related utilities (parsing, serialization, > etc) for Python 3 > ii python3-cssselect 1.2.0-2 > all cssselect parses CSS3 Selectors and translates > them to XPath 1.0 > ii python3-cups:amd64 2.0.1-5+b4 > amd64 Python3 bindings for CUPS > ii python3-cupshelpers 1.5.18-1 > all Python utility modules around the CUPS printing > system > ii python3-cycler 0.11.0-1 > all composable kwarg iterator (Python 3) > ii python3-dateutil 2.8.2-2 > all powerful extensions to the standard Python 3 > datetime module > ii python3-dbus 1.3.2-4+b1 > amd64 simple interprocess messaging system (Python 3 > interface) > ii python3-debconf 1.5.82 > all interact with debconf from Python 3 > ii python3-debian 0.1.49 > all Python 3 modules to work with Debian-related > data formats > ii python3-debianbts 4.0.1 > all Python interface to Debian's Bug Tracking System > ii python3-decorator 5.1.1-3 > all simplify usage of Python decorators by programmers > ii python3-dev 3.11.2-1+b1 > amd64 header files and a static library for Python > (default) > ii python3-distro 1.8.0-1 > all Linux OS platform information API > ii python3-distutils 3.11.2-3 > all distutils package for Python 3.x > ii python3-dnspython 2.3.0-1 > all DNS toolkit for Python 3 > ii python3-doc 3.11.2-1 > all documentation for the high-level object-oriented > language Python 3 > ii python3-ecdsa 0.19.0-2 > all ECDSA cryptographic signature library (Python 3) > ii python3-enchant 3.2.2-1 > all spellchecking library for Python 3 > ii python3-examples 3.11.2-1 > all examples for the Python language (default > version) > ii python3-exceptiongroup 1.1.0-1 > all Backport of PEP 654 (exception groups) > ii python3-executing 1.2.0-2 > all Inspect Python AST node being executed > ii python3-feedparser 6.0.10-1 > all Universal Feed Parser for Python 3 > ii python3-fonttools 4.38.0-1+b1 > amd64 Converts OpenType and TrueType fonts to and from > XML (Python 3 Library) > ii python3-fs 2.4.16-2 > all Python filesystem abstraction > ii python3-full 3.11.2-1+b1 > amd64 Default Python Interpreter with complete class > library > ii python3-gast 0.5.2-2 > all compatibility layer for the AST of various Python > versions (Python3 version) > ii python3-gdbm:amd64 3.11.2-3 > amd64 GNU dbm database support for Python 3.x > ii python3-gdbm-dbg:amd64 3.11.2-3 > amd64 GNU dbm database support for Python 3.x (debug > extension) > ii python3-gi 3.42.2-3+b1 > amd64 Python 3 bindings for gobject-introspection > libraries > ii python3-gi-cairo 3.42.2-3+b1 > amd64 Python 3 Cairo bindings for the GObject library > ii python3-gmpy2 2.1.2-2+b1 > amd64 interfaces GMP to Python 3 for fast, > unbound-precision computations > ii python3-h11 0.14.0-1 > all Pure-Python, bring-your-own-I/O implementation > of HTTP/1.1 (Python 3) > ii python3-h2 4.1.0-4 > all Pure-Python3 HTTP/2 State-Machine based protocol > implementation in Python > ii python3-hpack 4.0.0-2 > all Pure-Python3 HTTP/2 header encoding (HPACK) > ii python3-html2text 2020.1.16-2 > all Python module for converting HTML to Markdown > text (Python3 version) > ii python3-html5-parser 0.4.10-8+b1 > amd64 fast, standards compliant, C based, HTML 5 parser > for python > ii python3-html5lib 1.1-3 > all HTML parser/tokenizer based on the WHATWG HTML5 > specification > ii python3-httpcore 0.16.3-1 > all minimal low-level HTTP client > ii python3-httplib2 0.20.4-3 > all comprehensive HTTP client library written for > Python3 > ii python3-httpx 0.23.3-1 > all next generation HTTP client > ii python3-hyperframe 6.0.0-1 > all Pure-Python3 HTTP/2 framing code > ii python3-idna 3.3-1+deb12u1 > all Python IDNA2008 (RFC 5891) handling (Python 3) > ii python3-ifaddr 0.1.7-2 > all Pure Python implementation for detecting IP > addresses > ii python3-importlib-metadata 4.12.0-1 > all library to access the metadata for a Python > package - Python 3.x > ii python3-iniconfig 1.1.1-2 > all brain-dead simple parsing of ini files > ii python3-intelhex 2.3.0-3 > all Python support for Intel HEX (Python3) > ii python3-ipython 8.5.0-4 > all Enhanced interactive Python shell (Python 3 > version) > ii python3-jedi 0.18.2-1 > all autocompletion tool for Python 3 > ii python3-jeepney 0.8.0-3 > all pure Python D-Bus interface > ii python3-jinja2 3.1.2-1 > all small but fast and easy to use stand-alone > template engine > ii python3-joblib 1.2.0-4 > all tools to provide lightweight pipelining in Python > ii python3-jwt 2.6.0-1 > all Python 3 implementation of JSON Web Token > ii python3-kiwisolver 1.4.4-1+b1 > amd64 fast implementation of the Cassowary constraint > solver - Python 3.X > ii python3-lazr.restfulclient 0.14.5-1 > all client for lazr.restful-based web services > (Python 3) > ii python3-lazr.uri 1.0.6-3 > all library for parsing, manipulating, and generating > URIs > ii python3-ledger 3.3.0-3 > amd64 command-line double-entry accounting program > (python3 extension) > ii python3-lib2to3 3.11.2-3 > all Interactive high-level object-oriented language > (lib2to3) > ii python3-libevdev 0.5-3 > all Python 3 wrapper for libevdev > ii python3-livereload 2.6.3-2 > all automatic browser refresher (Python 3) > ii python3-louis 3.24.0-1 > all Python bindings for liblouis > ii python3-lunr 0.6.2-2 > all Python implementation of Lunr.js (Python3 version) > ii python3-lxml:amd64 4.9.2-1+b1 > amd64 pythonic binding for the libxml2 and libxslt > libraries > ii python3-lz4 4.0.2+dfsg-1+b2 > amd64 Python interface to the lz4 compression library > (Python 3) > ii python3-markdown 3.4.1-2 > all text-to-HTML conversion library/tool (Python 3 > version) > ii python3-markdown-it 2.1.0-5 > all Python port of markdown-it and some its > associated plugins > ii python3-markupsafe 2.1.2-1+b1 > amd64 HTML/XHTML/XML string library > ii python3-matplotlib 3.6.3-1+b1 > amd64 Python based plotting system in a style similar > to Matlab (Python 3) > ii python3-matplotlib-inline 0.1.6-2 > all Matplotlib backend for inline use in IPython and > Jupyter > ii python3-mdurl 0.1.2-1 > all Python port of the JavaScript mdurl package > ii python3-mechanize 1:0.4.8+pypi-5 > all stateful programmatic web browsing > ii python3-mergedeep 1.3.4-3 > all Deep merge function for Python (Python3 version) > ii python3-minimal 3.11.2-1+b1 > amd64 minimal subset of the Python language (default > python3 version) > ii python3-more-itertools 8.10.0-2 > all library with routines for operating on > iterables, beyond itertools (Python 3) > ii python3-mpmath 1.2.1-2 > all library for arbitrary-precision floating-point > arithmetic (Python3) > ii python3-msgpack 1.0.3-2+b1 > amd64 Python 3 implementation of MessagePack format > ii python3-munkres 1.1.4-3 > all munkres algorithm for the Assignment Problem - > Python 3 library > ii python3-mutagen 1.46.0-1 > all audio metadata editing library (Python 3) > ii python3-netifaces:amd64 0.11.0-2+b1 > amd64 portable network interface information - Python > 3.x > ii python3-nltk 3.8-1 > all Python3 libraries for natural language processing > ii python3-numpy 1:1.24.2-1 > amd64 Fast array facility to the Python 3 language > ii python3-oauthlib 3.2.2-1 > all generic, spec-compliant implementation of OAuth > for Python3 > ii python3-olefile 0.46-3 > all Python module to read/write MS OLE2 files > ii python3-openssl 23.0.0-1 > all Python 3 wrapper around the OpenSSL library > ii python3-outcome 1.2.0-1 > all capture the outcome of Python function calls > ii python3-packaging 23.0-1 > all core utilities for python3 packages > ii python3-parso 0.8.3-1 > all Python parser that supports error recovery - > Python 3.X > ii python3-paste 3.5.2+repack-1 > all tools for using a Web Server Gateway Interface > stack - Python 3.x > ii python3-pexpect 4.8.0-4 > all Python 3 module for automating interactive > applications > ii python3-pickleshare 0.7.5-5 > all File system based database that uses Python > pickles for Python 3 > ii python3-pil:amd64 9.4.0-1.1+deb12u1 > amd64 Python Imaging Library (Python3) > ii python3-pil.imagetk:amd64 9.4.0-1.1+deb12u1 > amd64 Python Imaging Library - ImageTk Module (Python3) > ii python3-pip 23.0.1+dfsg-1 > all Python package installer > ii python3-pip-whl 23.0.1+dfsg-1 > all Python package installer (pip wheel) > ii python3-pkg-resources 66.1.1-1 > all Package Discovery and Resource Access using > pkg_resources > ii python3-pluggy 1.0.0+repack-1 > all plugin and hook calling mechanisms for Python - > 3.x > ii python3-ply 3.11-5 > all Lex and Yacc implementation for Python3 > ii python3-prompt-toolkit 3.0.36-2 > all library for building interactive command lines > (Python 3) > ii python3-psutil 5.9.4-1+b1 > amd64 module providing convenience functions for > managing processes (Python3) > ii python3-psycopg2 2.9.5-1+b1 > amd64 Python 3 module for PostgreSQL > ii python3-ptyprocess 0.7.0-5 > all Run a subprocess in a pseudo terminal from Python > 3 > ii python3-pure-eval 0.2.2-1 > all Safely evaluate Python AST nodes without side > effects > ii python3-py 1.11.0-1 > all Advanced Python development support library > (Python 3) > ii python3-py7zr 0.11.3+dfsg-5 > amd64 pure Python 7-zip library > ii python3-pyatspi 2.46.0-2 > all Assistive Technology Service Provider Interface > - Python3 bindings > ii python3-pycparser 2.21-1 > all C parser in Python 3 > ii python3-pycryptodome 3.11.0+dfsg1-4 > amd64 cryptographic Python library (Python 3) > ii python3-pycurl 7.45.2-3 > amd64 Python bindings to libcurl (Python 3) > ii python3-pygments 2.14.0+dfsg-1 > all syntax highlighting package written in Python 3 > ii python3-pyinotify 0.9.6-2 > all simple Linux inotify Python bindings > ii python3-pyparsing 3.0.9-1 > all alternative to creating and executing simple > grammars - Python 3.x > ii python3-pyqt5 5.15.9+dfsg-1 > amd64 Python 3 bindings for Qt5 > ii python3-pyqt5.qtchart 5.15.6+dfsg-1 > amd64 Python 3 bindings for Qt5's Charts module > ii python3-pyqt5.qtmultimedia 5.15.9+dfsg-1 > amd64 Python 3 bindings for Qt5's Multimedia module > ii python3-pyqt5.qtopengl 5.15.9+dfsg-1 > amd64 Python 3 bindings for Qt5's OpenGL module > ii python3-pyqt5.qtpositioning 5.15.9+dfsg-1 > amd64 Python 3 bindings for QtPositioning module > ii python3-pyqt5.qtquick 5.15.9+dfsg-1 > amd64 Python 3 bindings for QtQuick module > ii python3-pyqt5.qtremoteobjects 5.15.9+dfsg-1 > amd64 Python 3 bindings for Qt5's RemoteObjects module > ii python3-pyqt5.qtsensors 5.15.9+dfsg-1 > amd64 Python 3 bindings for QtSensors module > ii python3-pyqt5.qtserialport 5.15.9+dfsg-1 > amd64 Python 3 bindings for QtSerialPort module > ii python3-pyqt5.qtsql 5.15.9+dfsg-1 > amd64 Python 3 bindings for Qt5's SQL module > ii python3-pyqt5.qtsvg 5.15.9+dfsg-1 > amd64 Python 3 bindings for Qt5's SVG module > ii python3-pyqt5.qttexttospeech 5.15.9+dfsg-1 > amd64 Python 3 bindings for QtSpeech module > ii python3-pyqt5.qtwebchannel 5.15.9+dfsg-1 > amd64 Python 3 bindings for Qt5's WebChannel module > ii python3-pyqt5.qtwebengine 5.15.6-1 > amd64 Python 3 bindings for Qt5's WebEngine module > ii python3-pyqt5.qtwebkit 5.15.9+dfsg-1 > amd64 Python 3 bindings for Qt5's WebKit module > ii python3-pyqt5.qtwebsockets 5.15.9+dfsg-1 > amd64 Python 3 bindings for Qt5's WebSockets module > ii python3-pyqt5.qtxmlpatterns 5.15.9+dfsg-1 > amd64 Python 3 bindings for Qt5's XmlPatterns module > ii python3-pyqt5.sip 12.11.1-1 > amd64 runtime module for Python extensions using SIP > ii python3-pyqt6 6.4.2-1 > amd64 Python bindings for Qt 6 > ii python3-pyqt6.qtqml 6.4.2-1 > amd64 Python bindings for Qt 6 QML module > ii python3-pyqt6.qtquick 6.4.2-1 > amd64 Python bindings for Qt 6 Quick module > ii python3-pyqt6.qtsvg 6.4.2-1 > amd64 Python bindings for Qt 6 SVG module > ii python3-pyqt6.qtwebchannel 6.4.2-1 > amd64 Python bindings for Qt 6 WebChannel module > ii python3-pyqt6.qtwebengine 6.4.0-1 > amd64 Python bindings for the Qt 6 WebEngine framework > ii python3-pyqt6.sip 13.4.1-1 > amd64 runtime module for Python extensions using SIP > ii python3-pysimplesoap 1.16.2-5 > all simple and lightweight SOAP Library (Python 3) > ii python3-pytest 7.2.1-2 > all Simple, powerful testing in Python3 > ii python3-pythran 0.11.0+ds-7 > amd64 ahead of time compiler for Python > ii python3-pyudev 0.24.0-1 > all Python3 bindings for libudev > ii python3-pyxattr:amd64 0.8.1-1 > amd64 module for manipulating filesystem extended > attributes (Python3) > ii python3-pyyaml-env-tag 0.1-3 > all Custom YAML tag for referencing environment > variables (Python3 version) > ii python3-qtpy 2.3.0-1 > all Abstraction layer for PySide2/PySide6/PyQt5/PyQt6 > (Python 3) > ii python3-regex 0.1.20221031-1+b1 > amd64 alternative regular expression module (Python 3) > ii python3-reportbug 12.0.0devuan2 > all Python modules for interacting with bug tracking > systems > ii python3-repoze.lru 0.7-3 > all tiny LRU cache implementation and decorator for > Python 3 > ii python3-requests 2.28.1+dfsg-1 > all elegant and simple HTTP library for Python3, > built for human beings > ii python3-requests-toolbelt 0.10.1-1 > all Utility belt for advanced users of > python3-requests > ii python3-rfc3986 1.5.0-2 > all validating URI references per RFC 3986 - Python > 3.x > ii python3-rich 13.3.1-1 > all render rich text, tables, progress bars, syntax > highlighting, markdown and more > ii python3-routes 2.5.1-3 > all Routing Recognition and Generation Tools for > Python 3 > ii python3-scipy 1.10.1-2 > amd64 scientific tools for Python 3 > ii python3-serial 3.5-2 > all pyserial - module encapsulating access for the > serial port > ii python3-setuptools 66.1.1-1 > all Python3 Distutils Enhancements > ii python3-setuptools-whl 66.1.1-1 > all Python Distutils Enhancements (wheel package) > ii python3-sgmllib3k 1.0.0-4 > all Python 3 port of Python 2's sgmllib > ii python3-simplejson 3.18.3-1 > amd64 simple, fast, extensible JSON encoder/decoder > for Python 3.x > ii python3-sip 4.19.25+dfsg-5+b1 > amd64 Python 3/C++ bindings generator runtime library > ii python3-sipbuild 6.7.7+dfsg-1 > amd64 Python bindings generator for C/C++ libraries ? > the build system > ii python3-six 1.16.0-4 > all Python 2 and 3 compatibility library > ii python3-smbc 1.0.23-2+b4 > amd64 Python 3 bindings for the Samba client library > ii python3-sniffio 1.2.0-1 > all detect which async Python library is in use > ii python3-software-properties 0.99.30-4.1~deb12u1 > all manage the repositories that you install software > from > ii python3-sortedcontainers 2.4.0-2 > all sorted container types: SortedList, SortedDict, > and SortedSet (Python 3) > ii python3-soupsieve 2.3.2-1 > all modern CSS selector implementation for > BeautifulSoup (Python 3) > ii python3-speechd 0.11.4-2 > all Python interface to Speech Dispatcher > ii python3-stack-data 0.6.2-3 > all Better tracebacks for Python > ii python3-sugar3 0.120-1 > all Sugar Learning Platform - toolkit Python3 bindings > ii python3-sympy 1.11.1-1 > all Computer Algebra System (CAS) in Python (Python > 3) > ii python3-tempita 0.5.2-7 > all very small text templating language - Python 3.x > ii python3-texttable 1.6.7-1 > all Module for creating simple ASCII tables ? python3 > ii python3-tk:amd64 3.11.2-3 > amd64 Tkinter - Writing Tk applications with Python 3.x > ii python3-tk-dbg:amd64 3.11.2-3 > amd64 Tkinter - Writing Tk applications with Python > 3.x (debug extension) > ii python3-toml 0.10.2-1 > all library for Tom's Obvious, Minimal Language - > Python 3.x > ii python3-tomli 2.0.1-2 > all lil' TOML parser for Python > ii python3-tornado 6.2.0-3 > amd64 scalable, non-blocking web server and tools - > Python 3 package > ii python3-tqdm 4.64.1-1 > all fast, extensible progress bar for Python 3 and > CLI tool > ii python3-traitlets 5.5.0-1 > all Lightweight Traits-like package for Python 3 > ii python3-trio 0.22.0-0.2 > all Python async concurrency and I/O library > ii python3-typing-extensions 4.4.0-1 > all Backported and Experimental Type Hints for Python > ii python3-tz 2022.7.1-4 > all Python3 version of the Olson timezone database > ii python3-ufolib2 0.14.0+dfsg1-1 > all Unified Font Object (UFO) fonts library > ii python3-unicodedata2 14.0.0+ds2-1+b2 > amd64 Python unicodedata backport/updates > ii python3-uno 4:7.4.7-1+deb12u4 > amd64 Python-UNO bridge > ii python3-unrardll 0.1.5-6+b1 > amd64 Python wrapper for the unrar shared library > ii python3-urllib3 1.26.12-1 > all HTTP library with thread-safe connection pooling > for Python3 > ii python3-userpath 1.8.0-1 > all tool for adding locations to the user PATH - > Python3 library > ii python3-venv 3.11.2-1+b1 > amd64 venv module for python3 (default python3 version) > ii python3-wadllib 1.3.6-4 > all Python 3 library for navigating WADL files > ii python3-watchdog 2.2.1-1 > all Python API and shell utilities to monitor file > system events > ii python3-wcwidth 0.2.5+dfsg1-1.1 > all determine printable width of a string on a > terminal > ii python3-webencodings 0.5.1-5 > all Python implementation of the WHATWG Encoding > standard > ii python3-webob 1:1.8.6-3 > all Python module providing WSGI request and response > objects (Python 3) > ii python3-websockets 10.4-1 > all implementation of the WebSocket Protocol (RFC > 6455) > ii python3-wheel 0.38.4-2 > all built-package format for Python > ii python3-wxgtk4.0 4.2.0+dfsg-3 > amd64 Python 3 interface to the wxWidgets > Cross-platform C++ GUI toolkit > ii python3-xcffib 0.11.1-4 > all CFFI-based Python binding for X > ii python3-xdg 0.28-2 > all Python 3 library to access freedesktop.org > standards > ii python3-yaml 6.0-3+b2 > amd64 YAML parser and emitter for Python3 > ii python3-zeroconf 0.47.3-1 > all Pure Python implementation of multicast DNS > service discovery (Python3) > ii python3-zipp 1.0.0-6 > all pathlib-compatible Zipfile object wrapper - > Python 3.x > rc python3.10-minimal 3.10.9-1 > amd64 Minimal subset of the Python language (version > 3.10) > rc python3.10-venv 3.10.9-1 > amd64 Interactive high-level object-oriented language > (pyvenv binary, version 3.10) > ii python3.11 3.11.2-6+deb12u2 > amd64 Interactive high-level object-oriented language > (version 3.11) > ii python3.11-dev 3.11.2-6+deb12u2 > amd64 Header files and a static library for Python > (v3.11) > ii python3.11-doc 3.11.2-6+deb12u2 > all Documentation for the high-level object-oriented > language Python (v3.11) > ii python3.11-examples 3.11.2-6+deb12u2 > all Examples for the Python language (v3.11) > ii python3.11-full 3.11.2-6+deb12u2 > amd64 Python Interpreter with complete class library > (version 3.11) > ii python3.11-minimal 3.11.2-6+deb12u2 > amd64 Minimal subset of the Python language (version > 3.11) > ii python3.11-venv 3.11.2-6+deb12u2 > amd64 Interactive high-level object-oriented language > (pyvenv binary, version 3.11) > ii python3.9 3.9.13-1 > amd64 Interactive high-level object-oriented language > (version 3.9) > ii python3.9-doc 3.9.13-1 > all Documentation for the high-level object-oriented > language Python (v3.9) > ii python3.9-minimal 3.9.13-1 > amd64 Minimal subset of the Python language (version > 3.9) > rc python3.9-venv 3.9.13-1 > amd64 Interactive high-level object-oriented language > (pyvenv binary, version 3.9) > > since there seems to be some doubt I included the whole list > > Regards > From aotto1968 at t-online.de Tue Aug 6 02:01:41 2024 From: aotto1968 at t-online.de (aotto1968) Date: Tue, 6 Aug 2024 08:01:41 +0200 Subject: python C-api and thread (Posting On Python-List Prohibited) In-Reply-To: References: Message-ID: On 06.08.24 02:32, Lawrence D'Oliveiro wrote: > On Mon, 5 Aug 2024 23:19:14 +0200, aotto1968 wrote: > >> Is it possible to run two completely independent Python interpreters in >> one process, each using a thread? >> >> By independent, I mean that no data is shared between the interpreters >> and thus the C API can be used without any other "lock/GIL" etc. > > Seems like yes > . ? I think that could be a solution. From aotto1968 at t-online.de Tue Aug 6 02:11:39 2024 From: aotto1968 at t-online.de (aotto1968) Date: Tue, 6 Aug 2024 08:11:39 +0200 Subject: python C-api and thread In-Reply-To: References: <4WdHSF10ZRznWJR@mail.python.org> Message-ID: On 06.08.24 04:34, Grant Edwards wrote: > On 2024-08-05, aotto1968 via Python-list wrote: > >> Is it possible to run two completely independent Python interpreters >> in one process, each using a thread? >> >> By independent, I mean that no data is shared between the >> interpreters and thus the C API can be used without any other >> "lock/GIL" etc. > > No, not using any OS I've ever seen. The usual definition of "threads" > is that they share data, and the definition of "processes" is that > processes don't share data. > > How exactly does what you're trying to do differ from runnig two > Python interpreters in two processes? > > -- > Grant > > > I know but I use a thread like a process because the "conversation" between the threads is done by my software. a Thread is usually faster to startup (thread-pool) this mean for high-load this is significant faster even than fork. From barry at barrys-emacs.org Tue Aug 6 16:12:46 2024 From: barry at barrys-emacs.org (Barry Scott) Date: Tue, 6 Aug 2024 21:12:46 +0100 Subject: python C-api and thread In-Reply-To: References: <4WdHSF10ZRznWJR@mail.python.org> Message-ID: > On 6 Aug 2024, at 07:11, aotto1968 via Python-list wrote: > > I know but I use a thread like a process because the "conversation" between the threads is done by my > software. a Thread is usually faster to startup (thread-pool) this mean for high-load this is > significant faster even than fork. using processes means you are more robust and can survive a process crash. using async, assuming you do enough I/O, will out perform threads. Barry From barry at barrys-emacs.org Tue Aug 6 16:09:41 2024 From: barry at barrys-emacs.org (Barry Scott) Date: Tue, 6 Aug 2024 21:09:41 +0100 Subject: Issue bootstrapping Python - troubleshooting steps? In-Reply-To: References: Message-ID: <49F69EE5-49DC-4128-B8F0-386CBDBA7EDA@barrys-emacs.org> > On 6 Aug 2024, at 02:49, Piper McCorkle via Python-list wrote: > > $ /tmp/sources/Python-3.12.4/configure --enable-shared --with-system-expat --enable-optimizations --prefix= I assume that you must provide a value for --prefix. The linux default would be --prefix=/usr Barry From o1bigtenor at gmail.com Tue Aug 6 18:57:09 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Tue, 6 Aug 2024 17:57:09 -0500 Subject: Help needed - - running into issues with python and its tools In-Reply-To: References: <6c8e722a-ff27-4979-b299-a25fdcac0036@DancesWithMice.info> <9e360cba-5774-4676-a025-810e655f0918@DancesWithMice.info> <65743dbe-948e-4dcb-a434-aedc108c11cc@wichmann.us> <9796ce7b-9ef7-4386-a79f-8ee3aa97d7bc@wichmann.us> <2066444d-2b5d-4b09-b1a8-8242c68591d1@wichmann.us> Message-ID: On Tue, Aug 6, 2024 at 10:53?AM Bill Deegan wrote: > I?m not looking through all the packages you have installed > > (Ctrl-F is your friend - - - ) > What version of python is installed on your system? > > There are actually 3 versions installed - - - which is why the whole list was posted. Your question was really not clear given the context. Regards From thomas at python.org Wed Aug 7 09:21:14 2024 From: thomas at python.org (Thomas Wouters) Date: Wed, 7 Aug 2024 15:21:14 +0200 Subject: [RELEASE] Python 3.12.5 released Message-ID: Python 3.12.5 is now available: https://www.python.org/downloads/release/python-3125/ This is the fifth maintenance release of Python 3.12 Python 3.12 is the newest major release of the Python programming language, and it contains many new features and optimizations. 3.12.5 is the latest maintenance release, containing more than 250 bugfixes, build improvements and documentation changes since 3.12.4. This version of Python 3.12 also comes with pip 24.2 by default. *However, due to an incompatibility with older macOS versions, macOS 10.9 through 10.12 will downgrade their version of pip to 24.1.2 during the installation process* (in the Install Certificates step). See the installer ReadMe and the pip issue on the matter for more information. Versions of macOS older than 10.13 haven?t been supported by Apple since 2019, and maintaining support for them is becoming increasingly difficult. While this release of 3.12 still supports them, *it is likely that we will be forced to drop support for macOS 10.12 and older in a future 3.12 release*. (Python 3.13 has already dropped support for them.) Major new features of the 3.12 series, compared to 3.11 New features - More flexible f-string parsing , allowing many things previously disallowed (PEP 701 ). - Support for the buffer protocol in Python code (PEP 688 ). - A new debugging/profiling API (PEP 669 ). - Support for isolated subinterpreters with separate Global Interpreter Locks (PEP 684 ). - Even more improved error messages . More exceptions potentially caused by typos now make suggestions to the user. - Support for the Linux perf profiler to report Python function names in traces. - Many large and small performance improvements (like PEP 709 and support for the BOLT binary optimizer), delivering an estimated 5% overall performance improvement. Type annotations - New type annotation syntax for generic classes (PEP 695 ). - New override decorator for methods (PEP 698 ). Deprecations - The deprecated wstr and wstr_length members of the C implementation of unicode objects were removed, per PEP 623 . - In the unittest module, a number of long deprecated methods and classes were removed. (They had been deprecated since Python 3.1 or 3.2). - The deprecated smtpd and distutils modules have been removed (see PEP 594 and PEP 632 . The setuptools package continues to provide the distutils module. - A number of other old, broken and deprecated functions, classes and methods have been removed. - Invalid backslash escape sequences in strings now warn with SyntaxWarning instead of DeprecationWarning, making them more visible. (They will become syntax errors in the future.) - The internal representation of integers has changed in preparation for performance enhancements. (This should not affect most users as it is an internal detail, but it may cause problems for Cython-generated code.) For more details on the changes to Python 3.12, see What?s new in Python 3.12 . More resources - Online Documentation . - PEP 693 , the Python 3.12 Release Schedule. - Report bugs via GitHub Issues . - Help fund Python directly or via GitHub Sponsors , and support the Python community . 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 Software Foundation. Your release team, Thomas Wouters ?ukasz Langa Ned Deily Steve Dower -- Thomas Wouters From toby at tobiah.org Wed Aug 7 11:35:36 2024 From: toby at tobiah.org (Tobiah) Date: Wed, 7 Aug 2024 08:35:36 -0700 Subject: python3 package import difference? Message-ID: I have an old library from 20 some years ago for use with python2, that is structured like this: rcs ??? dbi ??? ??? __init__.py ??? ??? dbi.py ??? ??? regos.py ??? __init__.py -- *empty* the __init__.py file under 'rcs' is empty. The one under rcs.dbi contains: from dbi import * from regos import * With python2, I'd go: import rcs.dbi then I'd have access to stuff in regos.py as: rcs.dbi.feature() (Where 'feature' is defined in regos.py) When I do the same import with python3, I get: Traceback (most recent call last): File "/home/toby/me", line 1, in import rcs.dbi File "/usr/regos-1.0/lib/python/rcs/dbi/__init__.py", line 1, in from dbi import * ModuleNotFoundError: No module named 'dbi' What's changed, and how do I fix it? Thanks! From rs.quim at gmail.com Wed Aug 7 18:22:33 2024 From: rs.quim at gmail.com (Ronaldo Sc) Date: Wed, 7 Aug 2024 19:22:33 -0300 Subject: python3 package import difference? In-Reply-To: References: Message-ID: I believe you will need to track the modules in the folder *dbi *in the root file '__init__.py'. So there's an alternative to use the statement __all__ in the root filet __init__.py, check the link where I find a use case: *https://sentry.io/answers/what-is-init-py-for-in-python/#using-__init__py-to-run-code-and-control--imports * References to take more deep in those issues: PEP-3147 https://docs.python.org/3/tutorial/modules.html in this link above we have some examples of relative imports: from . import echo from .. import formats from ..filters import equalizer In your code you're using "import *" , this is not a good practice when using only some features in your module(s) because you'll inject more garbage into memory if there are features you're not using. Share with us the updates on your code. Ronaldo Em qua., 7 de ago. de 2024 ?s 14:40, Tobiah via Python-list < python-list at python.org> escreveu: > I have an old library from 20 some years ago > for use with python2, that is structured like this: > > rcs > ??? dbi > ? ??? __init__.py > ? ??? dbi.py > ? ??? regos.py > ??? __init__.py -- *empty* > > > the __init__.py file under 'rcs' is empty. > The one under rcs.dbi contains: > > from dbi import * > from regos import * > > > With python2, I'd go: > > import rcs.dbi > > then I'd have access to stuff in regos.py > as: > > rcs.dbi.feature() (Where 'feature' is defined in regos.py) > > > When I do the same import with python3, I get: > > Traceback (most recent call last): > File "/home/toby/me", line 1, in > import rcs.dbi > File "/usr/regos-1.0/lib/python/rcs/dbi/__init__.py", line 1, in > > from dbi import * > ModuleNotFoundError: No module named 'dbi' > > > What's changed, and how do I fix it? > > > Thanks! > -- > https://mail.python.org/mailman/listinfo/python-list > From rosuav at gmail.com Wed Aug 7 18:43:54 2024 From: rosuav at gmail.com (Chris Angelico) Date: Thu, 8 Aug 2024 08:43:54 +1000 Subject: python3 package import difference? In-Reply-To: References: Message-ID: On Thu, 8 Aug 2024 at 03:40, Tobiah via Python-list wrote: > The one under rcs.dbi contains: > > from dbi import * > from regos import * > You probably want these to be package-relative now: from .dbi import * from .regos import * Or, since you're using namespaced imports anyway ("rcs.dbi.feature"), you may prefer this form: from . import dbi, regos ChrisA From meejah at meejah.ca Wed Aug 7 20:50:30 2024 From: meejah at meejah.ca (meejah) Date: Wed, 07 Aug 2024 18:50:30 -0600 Subject: magic-wormhole 0.15.0 Message-ID: <34ff523d-08eb-4ba7-be16-56d9c54d397f@app.fastmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Greetings, I'm gruntled to announce that magic-wormhole 0.15.0 is released. Magic Wormhole is a Python library and CLI tool to securely get arbitrary data from one computer to another using short, one-time, human- pronouncable codes and end-to-end encryption. The library allows use of the lower-level protocol for things besides file-transfer. In this release are the following changes since 0.14.0: * Incorporate attrs' zope-interface support (#492, #527, from https://github.com/meejah) * Add "codespell" to correct spelling (#526, from https://github.com/yarikoptic) * Fix bash completions (#525, from https://github.com/RobertoD91) * run tests properly when Noise is not installed (#522, from https://github.com/anarcat) You can find the release on PyPI: https://pypi.org/project/magic-wormhole/ More information can be found: https://magic-wormhole.readthedocs.io/en/latest/welcome.html https://github.com/magic-wormhole/magic-wormhole thanks, meejah -----BEGIN PGP SIGNATURE----- iQFFBAEBCgAvFiEEnVor1WiOy4id680/wmAoAxKAaacFAma0DBkRHG1lZWphaEBt ZWVqYWguY2EACgkQwmAoAxKAaad3QwgAg9XFz+xO7Xl67lflWX/JRr63SCJ39frL BejL6AX1sdcLKUoqvX/WUMjTsAzoNrOMtmPbgXM1BIwIkY/8racV6H8fgBbeyrOq 3CW2kLVhfsGCdf961kF0/r2ToXBTB7/tkSvsmmR3W/IIkaT8+V2/w5aROBcreLq/ 8r1KCOpPFqG6K873ohoOQNETz7gPIwWqfnET7qyRulToauxNc9e9hbYjXacLSVwl CnkE7HsrDsbG2NEekJiwKyXJ59I18UZUj5S7V3ul5Q11BcsE7hftIwbzsr7VvRmi VXuQVgJ28iezyBgYQ6A/JWTQocCtbuQ+c6DEd+CdFNdzJy6Oofo8DQ== =A0jS -----END PGP SIGNATURE----- From cs at cskk.id.au Wed Aug 7 21:17:56 2024 From: cs at cskk.id.au (Cameron Simpson) Date: Thu, 8 Aug 2024 11:17:56 +1000 Subject: python3 package import difference? In-Reply-To: References: Message-ID: On 07Aug2024 08:35, Tobiah wrote: >When I do the same import with python3, I get: > > Traceback (most recent call last): > File "/home/toby/me", line 1, in > import rcs.dbi > File "/usr/regos-1.0/lib/python/rcs/dbi/__init__.py", line 1, in > from dbi import * > ModuleNotFoundError: No module named 'dbi' Python 3 imports are absolute (they start from the top of the package tree and you have no `dbi` at the top). You want a relative import i.e.: from .dbi import * Cheers, Cameron Simpson From cs at cskk.id.au Thu Aug 8 19:53:52 2024 From: cs at cskk.id.au (Cameron Simpson) Date: Fri, 9 Aug 2024 09:53:52 +1000 Subject: python3 package import difference? In-Reply-To: References: Message-ID: On 08Aug2024 21:55, Gilmeh Serda wrote: >I guess in a sense Py2 was smarter figuring out what whent where and >where >it came from. Or it was a bad hack that has been removed. No, Python 2 offered less control. From Charlottelilyplant at outlook.com Sun Aug 11 08:06:49 2024 From: Charlottelilyplant at outlook.com (Charlotte Plant) Date: Sun, 11 Aug 2024 12:06:49 +0000 Subject: Error codes Message-ID: Hiya, I'm using the sims 4 mod constructor by Zerbu, and when saving I'm getting these error codes. I'm going around in circles trying to figure out what is causing it, and I'm stuck! Can you help please? Thank you. Errors: There was an error compiling the generated Python script. This can happen if you tried to install Python but the isntallation was interrupted. Please try running the installer again. It should be located in the "Python Installer" subfolder of where you extracted Mod Constructor. Element ID: (No Element) Element Name: (No Element) --- Could not find file 'C:\Users\Charl\OneDrive\Documents\The Sims 4 Mod Constructor\Projects\MetalMummysMods_Ehlers-DanlosMod\Python\__pycache__\MetalMummysMods_Ehlers-DanlosMod.cpython-37.pyc'. Element ID: (No Element) Element Name: (No Element) --- Sent from Outlook for iOS From sch at fedora.email Sun Aug 11 09:42:23 2024 From: sch at fedora.email (Schimon Jehudah) Date: Sun, 11 Aug 2024 16:42:23 +0300 Subject: Installation of Slixfeed with pip fails In-Reply-To: <18dc5792-7a6e-4ba6-9d00-fa5d2777a0f2@tompassin.net> References: <20240730203643.7810f6dc@workstation.localdomain> <17F316FA-3A1B-48E3-9098-07C3CF32908A@barrys-emacs.org> <18dc5792-7a6e-4ba6-9d00-fa5d2777a0f2@tompassin.net> Message-ID: <20240811164223.04aa9828@workstation.localdomain> Barry. Thomas. I agree. I do not have his machine to make observations, and therefore this report is obscured. I want to solve an issue of a friend who has attempted to install Slixfeed, which is based on OMEMO, and the installation has failed. I have asked him to install python-omemo and he has reported this: $ pip install omemo [...] ERROR Failed building wheel for XEdDSA ERROR Could not build wheels for XEdDSA, which is required to install pyproject.toml-based projects Please see the attached screenshot. Kind regards, Schimon On Sat, 3 Aug 2024 16:04:07 -0400 Thomas Passin via Python-list wrote: > 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 encryption, and a friend of > >> mine has reported that there is an issue installing it with pip. > >> > >> I suppoes this is a fault of a package at PyPi, or a fault at my > >> pyproject.toml. > >> > >> This is the link to the project: > >> https://git.xmpp-it.net/sch/Slixfeed#getting-started > >> > >> Please advise, > > This question is like asking "My car won't run. I suppose it's the > engine. Please advise." > > > Please duplicate the problem and if after doing that you have not > > fixed the problem post details here. > > > > Barry > > > > > > > >> Schimon > >> -- > >> https://mail.python.org/mailman/listinfo/python-list > >> > > > From mats at wichmann.us Mon Aug 12 12:59:54 2024 From: mats at wichmann.us (Mats Wichmann) Date: Mon, 12 Aug 2024 10:59:54 -0600 Subject: Installation of Slixfeed with pip fails In-Reply-To: <20240811164223.04aa9828@workstation.localdomain> References: <20240730203643.7810f6dc@workstation.localdomain> <17F316FA-3A1B-48E3-9098-07C3CF32908A@barrys-emacs.org> <18dc5792-7a6e-4ba6-9d00-fa5d2777a0f2@tompassin.net> <20240811164223.04aa9828@workstation.localdomain> Message-ID: <90b3aa56-325f-474c-b1b1-774e1f7345c9@wichmann.us> On 8/11/24 07:42, Schimon Jehudah via Python-list wrote: > Barry. Thomas. I agree. > > I do not have his machine to make observations, and therefore this > report is obscured. > > I want to solve an issue of a friend who has attempted to install > Slixfeed, which is based on OMEMO, and the installation has failed. > > I have asked him to install python-omemo and he has reported this: > > $ pip install omemo > > [...] > > ERROR Failed building wheel for XEdDSA > ERROR Could not build wheels for XEdDSA, which is required to install pyproject.toml-based projects > > Please see the attached screenshot. > > Kind regards, > Schimon No screenshot arrived here, but this is a pretty typical failure, especially on Windows systems: pip didn't find a suitable binary wheel package for the Python version / platform combination, and so tried to build one from sources. That often requires additional setup before it can work. The question would be why - I looked here: https://pypi.org/project/XEdDSA/#files and there are binary wheels for Windows, Linux, Mac for CPython 3.7 through 3.12, and also wheels for PyPy from 3.7 through 3.10, so unless your friend's machine doesn't fit that range, you'd expect that particular package to install okay. From robin at reportlab.com Tue Aug 13 05:24:25 2024 From: robin at reportlab.com (Robin Becker) Date: Tue, 13 Aug 2024 10:24:25 +0100 Subject: troglodytes Message-ID: I am clearly one of the troglodytes referred to in recent discussions around the PSF. I've been around in python land for far too long, my eyesight fails etc etc. I feel strongly that a miscarriage of justice has been made in the 3-month banning of a famous python developer from some areas of discourse. I have had my share of disagreements with others in the past and have been sometimes violent or disrespectful in emails. I might have been in the kill list of some, but never banned from any mailing lists. Honest dialogue is much better than imposed silence. -- grumblingly-yrs -- Robin Becker From barry at barrys-emacs.org Tue Aug 13 09:29:46 2024 From: barry at barrys-emacs.org (Barry Scott) Date: Tue, 13 Aug 2024 14:29:46 +0100 Subject: Error codes In-Reply-To: References: Message-ID: <55E19A3B-3E76-46F0-8DB1-3E262409A9A2@barrys-emacs.org> > On 11 Aug 2024, at 13:06, Charlotte Plant via Python-list wrote: > > Hiya, I'm using the sims 4 mod constructor by Zerbu, and when saving I'm getting these error codes. > I'm going around in circles trying to figure out what is causing it, and I'm stuck! > Can you help please? > Thank you. > Errors: > There was an error compiling the generated Python script. This can happen if you tried to install Python but the isntallation was interrupted. Please try running the installer again. It should be located in the "Python Installer" subfolder of where you extracted Mod Constructor. > Element ID: (No Element) > Element Name: (No Element) > --- > > Could not find file 'C:\Users\Charl\OneDrive\Documents\The Sims 4 Mod Constructor\Projects\MetalMummysMods_Ehlers-DanlosMod\Python\__pycache__\MetalMummysMods_Ehlers-DanlosMod.cpython-37.pyc'. > Element ID: (No Element) > Element Name: (No Element) These are app specific errors. The most likely source of help will be to ask Zerbu, who I assume is the author and maintainer. Barry > --- > > > > > Sent from Outlook for iOS > -- > https://mail.python.org/mailman/listinfo/python-list > From torriem at gmail.com Tue Aug 13 10:54:04 2024 From: torriem at gmail.com (Michael Torrie) Date: Tue, 13 Aug 2024 08:54:04 -0600 Subject: troglodytes In-Reply-To: References: Message-ID: <614d43b1-c591-0596-714c-ebe50df42952@gmail.com> On 8/13/24 3:24 AM, Robin Becker via Python-list wrote: > I am clearly one of the troglodytes referred to in recent discussions around the PSF. I've been around in python land > for far too long, my eyesight fails etc etc. > > I feel strongly that a miscarriage of justice has been made in the 3-month banning of a famous python developer from > some areas of discourse. > > I have had my share of disagreements with others in the past and have been sometimes violent or disrespectful in emails. > > I might have been in the kill list of some, but never banned from any mailing lists. > > Honest dialogue is much better than imposed silence. > > -- grumblingly-yrs -- > Robin Becker Agreed. Here's a good summary of the issue: https://chrismcdonough.substack.com/p/the-shameful-defenestration-of-tim The PSF has really screwed this up. Really embarrassing, frankly. And sad. From sjeik_appie at hotmail.com Tue Aug 13 15:46:20 2024 From: sjeik_appie at hotmail.com (Albert-Jan Roskam) Date: Tue, 13 Aug 2024 21:46:20 +0200 Subject: Error codes In-Reply-To: <55E19A3B-3E76-46F0-8DB1-3E262409A9A2@barrys-emacs.org> Message-ID: On Aug 13, 2024 15:29, Barry Scott via Python-list wrote: > Could not find file 'C:\Users\Charl\OneDrive\Documents\The Sims 4 Mod Constructor\Projects\MetalMummysMods_Ehlers-DanlosMod\Python\__pycache__\MetalMummysMods_Ehlers-DanlosMod.cpython-37.pyc'. > Element ID: (No Element) > Element Name: (No Element) ======== Wild guess: do you have sufficicient permissions to write the .pyc files? What happens if you run the program with the -B option? https://docs.python.org/3/using/cmdline.html#envvar-PYTHONDONTWRITEBYTECODE From olegsivokon at gmail.com Tue Aug 13 19:21:25 2024 From: olegsivokon at gmail.com (Left Right) Date: Wed, 14 Aug 2024 01:21:25 +0200 Subject: troglodytes In-Reply-To: <614d43b1-c591-0596-714c-ebe50df42952@gmail.com> References: <614d43b1-c591-0596-714c-ebe50df42952@gmail.com> Message-ID: Hahah, as someone with extensive experience of being banned by various CoC-waving Python online communities' authorities I really enjoyed the saga. Watching little men grasp for power on the Web to squash their opponents never stops to amuse me. On Tue, Aug 13, 2024 at 4:56?PM Michael Torrie via Python-list wrote: > > On 8/13/24 3:24 AM, Robin Becker via Python-list wrote: > > I am clearly one of the troglodytes referred to in recent discussions around the PSF. I've been around in python land > > for far too long, my eyesight fails etc etc. > > > > I feel strongly that a miscarriage of justice has been made in the 3-month banning of a famous python developer from > > some areas of discourse. > > > > I have had my share of disagreements with others in the past and have been sometimes violent or disrespectful in emails. > > > > I might have been in the kill list of some, but never banned from any mailing lists. > > > > Honest dialogue is much better than imposed silence. > > > > -- grumblingly-yrs -- > > Robin Becker > > Agreed. Here's a good summary of the issue: > https://chrismcdonough.substack.com/p/the-shameful-defenestration-of-tim > > The PSF has really screwed this up. Really embarrassing, frankly. And > sad. > > > -- > https://mail.python.org/mailman/listinfo/python-list From Keith.S.Thompson+u at gmail.com Wed Aug 14 16:14:10 2024 From: Keith.S.Thompson+u at gmail.com (Keith Thompson) Date: Wed, 14 Aug 2024 13:14:10 -0700 Subject: bring back nntp library to python3 References: Message-ID: <87bk1ug8vh.fsf@nosuchdomain.example.com> "test" writes: > why is the nntp library deprecated in recent python versions? they > clearly lost touch nntplib is not vanishing into thin air. It's just not going to be part of a default Python installation. (It's not there in Python 3.13.0rc1.) In my opinion the use of the word "deprecated" is misleading. $ python3 Python 3.12.4 (main, Jun 27 2024, 13:53:59) [GCC 13.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import nntplib :1: DeprecationWarning: 'nntplib' is deprecated and slated for removal in Python 3.13 >>> $ The rationale for removing nntplib and other modules from the default installation is explained in PEP 0594 . """ Back in the early days of Python, the interpreter came with a large set of useful modules. This was often referred to as ?batteries included? philosophy and was one of the cornerstones to Python?s success story. Users didn?t have to figure out how to download and install separate packages in order to write a simple web server or parse email. Times have changed. With the introduction of PyPI (n?e Cheeseshop), setuptools, and later pip, it became simple and straightforward to download and install packages. Nowadays Python has a rich and vibrant ecosystem of third-party packages. It?s pretty much standard to either install packages from PyPI or use one of the many Python or Linux distributions. [...] The nntplib module implements the client side of the Network News Transfer Protocol (nntp). News groups used to be a dominant platform for online discussions. Over the last two decades, news has been slowly but steadily replaced with mailing lists and web-based discussion platforms. Twisted is also planning to deprecate NNTP support and pynntp hasn?t seen any activity since 2014. This is a good indicator that the public interest in NNTP support is declining. The nntplib tests have been the cause of additional work in the recent past. Python only contains the client side of NNTP, so the tests connect to external news servers. The servers are sometimes unavailable, too slow, or do not work correctly over IPv6. The situation causes flaky test runs on buildbots. """ -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u at gmail.com void Void(void) { Void(); } /* The recursive call of the void */ From geodandw at gmail.com Wed Aug 14 16:26:47 2024 From: geodandw at gmail.com (geodandw) Date: Wed, 14 Aug 2024 16:26:47 -0400 Subject: troglodytes In-Reply-To: References: <614d43b1-c591-0596-714c-ebe50df42952@gmail.com> Message-ID: On 8/13/24 19:21, Left Right wrote: > Hahah, as someone with extensive experience of being banned by various > CoC-waving Python online communities' authorities I really enjoyed the > saga. Watching little men grasp for power on the Web to squash their > opponents never stops to amuse me. > > On Tue, Aug 13, 2024 at 4:56?PM Michael Torrie via Python-list > wrote: >> Why do you have to belittle other people? From olegsivokon at gmail.com Wed Aug 14 18:19:31 2024 From: olegsivokon at gmail.com (Left Right) Date: Thu, 15 Aug 2024 00:19:31 +0200 Subject: troglodytes In-Reply-To: References: <614d43b1-c591-0596-714c-ebe50df42952@gmail.com> Message-ID: > Why do you have to belittle other people? Who says I have to? I like to! I like to see people driven by all sorts of low and reprehensible motives being punished for it. I don't know if I need to explain this motivation further. I think it's a very natural feeling. Human nature if you will. The primordial sense of justice, that was later developed into a bunch of different theories of how justice might work. From ethan at stoneleaf.us Wed Aug 14 18:29:40 2024 From: ethan at stoneleaf.us (Ethan Furman) Date: Wed, 14 Aug 2024 15:29:40 -0700 Subject: bring back nntp library to python3 In-Reply-To: <87bk1ug8vh.fsf@nosuchdomain.example.com> References: <87bk1ug8vh.fsf@nosuchdomain.example.com> Message-ID: <8fd2bfcd-dbfd-9c68-781d-1ac94bdcae32@stoneleaf.us> On 8/14/24 13:14, Keith Thompson via Python-list wrote: > The rationale for removing nntplib and other modules from the default > installation is explained in PEP 0594 . > > """ > The nntplib tests have been the cause of additional work in the recent > past. Python only contains the client side of NNTP, so the tests connect > to external news servers. The servers are sometimes unavailable, too > slow, or do not work correctly over IPv6. The situation causes flaky > test runs on buildbots. > """ Sounds like we need somebody to write an NNTP server for the stdlib! :-) -- ~Ethan~ From ethan at stoneleaf.us Wed Aug 14 18:40:06 2024 From: ethan at stoneleaf.us (Ethan Furman) Date: Wed, 14 Aug 2024 15:40:06 -0700 Subject: troglodytes In-Reply-To: References: <614d43b1-c591-0596-714c-ebe50df42952@gmail.com> Message-ID: <8829b86c-1756-d268-77a9-8b5a0e0bd6a8@stoneleaf.us> On 8/14/24 15:19, Left Right via Python-list wrote: >On 8/14/24 13:26, geodandw via Python-list wrote: >> Why do you have to belittle other people? > Who says I have to? I like to! I like to see people driven by all > sorts of low and reprehensible motives being punished for it. I don't > know if I need to explain this motivation further. I think it's a very > natural feeling. Human nature if you will. The primordial sense of > justice, that was later developed into a bunch of different theories > of how justice might work. It is not necessary to belittle in order to enjoy justice. -- ~Ethan~ From olegsivokon at gmail.com Wed Aug 14 18:32:54 2024 From: olegsivokon at gmail.com (Left Right) Date: Thu, 15 Aug 2024 00:32:54 +0200 Subject: bring back nntp library to python3 In-Reply-To: <87bk1ug8vh.fsf@nosuchdomain.example.com> References: <87bk1ug8vh.fsf@nosuchdomain.example.com> Message-ID: > it became simple and straightforward to > download and install packages. I think the right word for this is "delusional". But people get offended when other people use the right words. Instead they want a grotesque round-about way of saying the same thing... So, the grotesque round-about way of saying this, if you are still reading that is... Even if pip, setuptools and friends worked well (which they don't) there are big problems that these tools cannot solve: * Network partition * Version mismatch * Competition between different installer tools * Increased requirement for vetting and validation * Shortening shelf life of existing projects But hey, this is just letting off steam. Nobody cares. The decision was already made and it won't be unmade. And, in the grand scheme of things this is a drop in a bucket of the awful decisions that were guiding Python in the last decade or so. From learn2program at gmail.com Wed Aug 14 18:56:39 2024 From: learn2program at gmail.com (Alan Gauld) Date: Wed, 14 Aug 2024 23:56:39 +0100 Subject: bring back nntp library to python3 In-Reply-To: References: <87bk1ug8vh.fsf@nosuchdomain.example.com> Message-ID: On 14/08/2024 23:32, Left Right via Python-list wrote: >> it became simple and straightforward to >> download and install packages. > > I think the right word for this is "delusional". I agree. But even if it worked it doesn't alter the fact that by not having batteries included it puts the onus on developers to build complex installs since their clients can't be expected to use pip etc. And a vanilla python no longer comes with the batteries. It greatly adds to the Python users workload even as it lightens the library maintainers load. It was certainly one of the main reasons I adopted python rather than perl. But thankfully I'm retired now so it's somebody else's problem. > But hey, this is just letting off steam. Nobody cares. Lots of people care but the ability to influence these decisions seems to have been removed far from the general python user community. Python has moved from the BDFL/Bazaar to the Committee/Cathedral. Probably an inevitable consequence of its current "popularity". -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos From ethan at stoneleaf.us Wed Aug 14 19:00:52 2024 From: ethan at stoneleaf.us (Ethan Furman) Date: Wed, 14 Aug 2024 16:00:52 -0700 Subject: bring back nntp library to python3 In-Reply-To: References: <87bk1ug8vh.fsf@nosuchdomain.example.com> Message-ID: <9cf532a1-33a2-eb0b-e9e9-5785bcc572ff@stoneleaf.us> On 8/14/24 15:32, Left Right via Python-list wrote: > I think the right word for this is "delusional". But people get > offended when other people use the right words. Instead they want a > grotesque round-about way of saying the same thing... > > So, the grotesque round-about way of saying this, if you are still > reading that is... Even if pip, setuptools and friends worked well > (which they don't) there are big problems that these tools cannot > solve: > > * Network partition > * Version mismatch > * Competition between different installer tools > * Increased requirement for vetting and validation > * Shortening shelf life of existing projects > > But hey, this is just letting off steam. No need to hit if you're just venting. > Nobody cares. Yeah, people do. -- ~Ethan~ From ethan at stoneleaf.us Wed Aug 14 19:08:31 2024 From: ethan at stoneleaf.us (Ethan Furman) Date: Wed, 14 Aug 2024 16:08:31 -0700 Subject: bring back nntp library to python3 In-Reply-To: References: <87bk1ug8vh.fsf@nosuchdomain.example.com> Message-ID: On 8/14/24 15:56, Alan Gauld via Python-list wrote: > Lots of people care but the ability to influence these > decisions seems to have been removed far from the > general python user community. Python has moved from > the BDFL/Bazaar to the Committee/Cathedral. Probably > an inevitable consequence of its current "popularity". The move came because of the vitriol directed at the BDFL (and others) with every major (and sometimes minor) change to Python. Every action has consequences, and in this case the consequence was that we are now run by committee. -- ~Ethan~ From PythonList at DancesWithMice.info Wed Aug 14 19:39:33 2024 From: PythonList at DancesWithMice.info (dn) Date: Thu, 15 Aug 2024 11:39:33 +1200 Subject: bring back nntp library to python3 In-Reply-To: References: <87bk1ug8vh.fsf@nosuchdomain.example.com> Message-ID: On 15/08/24 10:56, Alan Gauld via Python-list wrote: > On 14/08/2024 23:32, Left Right via Python-list wrote: > Lots of people care but the ability to influence these > decisions seems to have been removed far from the > general python user community. Python has moved from > the BDFL/Bazaar to the Committee/Cathedral. Probably > an inevitable consequence of its current "popularity". Perhaps in the ?good, old, days when Python was the small, scrappy language a strong community formed because there was a strong sense of "us" - as in, "us against the world". This atmosphere generates "cohesion" within the group. Does it (still) exist today? Where/when? Python is a victim of its own success. It is now used in so many different fields within computing it is not possible for one person to say "I use it all". Thus, when someone says (s)he is a "Python Programmer" what is meant is most-likely one of web/front-end work, back-end/server/networking, data science, machine learning, etc. As a PUG-Leader, this a daunting part of trying to generate and keep 'community'. 'Data science people' won't attend 'web' meetings (by-and-large), and vice-versa - indeed some even feel the 'right' to moan that some other area of Python happens to be the topic for the next meeting. The converse view (which is seldom well-taken if offered as a riposte to such complaints) is that if folk volunteer in some way, their efforts will (most likely) be embraced with gratitude - but how many do make such offers/participate in a practical fashion! Whither community? Cohesion? Thus, a grave difficulty for leaders who are unable to see these sorts of concerns - and act accordingly. A shift that should have occurred within steering groups as Python grew in popularity, was to add applications-expertise to the central group of Core Maintainers. However, unless there is trust and respect between members, one may be (too) quick to reject comments and ideas from 'another'. Perhaps Python's state-of-democracy is heavily influenced by nation-state politics, where the desire for division seems to be overwhelming ideas of community/society? How does such benefit community - those represented? Growth and size will inevitably require adaption. Almost inevitably it brings 'structure'. Whereas some do care (per @Alan's point), the average Python-programmer probably doesn't understand the current structures, and might even eschew such/reject their need. How does this fit with "community"? What is personal-responsibility? What channels should folk be using? Are members of the community feeling 'heard'? If a committee perceives themselves besieged, the tendency is to look inwards and become determinedly-defensive - which, in cases like this, is likely the exact opposite of what the decision's 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' participate? What decision-making processes are usable in the face of such large numbers - and how seriously are/would they be taken by 'the average Python user'? -- Regards, =dn From miked at dewhirst.com.au Wed Aug 14 19:53:14 2024 From: miked at dewhirst.com.au (Mike Dewhirst) Date: Thu, 15 Aug 2024 09:53:14 +1000 Subject: troglodytes In-Reply-To: <614d43b1-c591-0596-714c-ebe50df42952@gmail.com> References: <614d43b1-c591-0596-714c-ebe50df42952@gmail.com> Message-ID: <1b33d01e-aa52-469e-8b19-97eec05a5c95@dewhirst.com.au> On 14/08/2024 12:54 am, Michael Torrie via Python-list wrote: > On 8/13/24 3:24 AM, Robin Becker via Python-list wrote: >> I am clearly one of the troglodytes referred to in recent discussions around the PSF. I've been around in python land >> for far too long, my eyesight fails etc etc. >> >> I feel strongly that a miscarriage of justice has been made in the 3-month banning of a famous python developer from >> some areas of discourse. >> >> I have had my share of disagreements with others in the past and have been sometimes violent or disrespectful in emails. >> >> I might have been in the kill list of some, but never banned from any mailing lists. >> >> Honest dialogue is much better than imposed silence. >> >> -- grumblingly-yrs -- >> Robin Becker > Agreed. Here's a good summary of the issue: > https://chrismcdonough.substack.com/p/the-shameful-defenestration-of-tim > > The PSF has really screwed this up. Really embarrassing, frankly. And > sad. I read Chris McDonough's defence of Tim Peters and he has convinced me. Not because of everything he said but because I have experience of committees. And other things. The problem is generational. Later generations can see the faults of earlier generations in brilliant hindsight. I certainly did. In my case, those earlier generations caused depressions and world wars. That was pretty bad wasn't it? Can I blame my ancestors for that? My great-grandparents were born in the second half of the 1800s; my grandparents in the late 1800s. They were undoubtedly responsible for WW1 and the great depression wouldn't you say? So my parents who grew up after WW1 and both fought in WW2 were forced to give the best years of their lives to the worst of times. Not their fault. In fact they were heroic to do all that and have me and my siblings starting in their mid-twenties. Here's the rub: they had serious faults and I could see them clearly - when I was in my twenties and having children of my own. I'll be 80 next year and I have a clearer perspective now. I now understand why the oldest known culture (60k+ years) survived intact for so long including the last few thousand years of trading between Australia and Asia and more recent centuries with Europe. It wasn't entirely due to isolation. In fact there were hundreds of separate nations and languages in Australia so no-one was all that isolated. They had traders and diplomats and warriors just like the rest of humanity. The difference isn't with them it is with us. We have lost what keeps them together. They respect their elders. We don't. They had to because their survival depended on lore and knowledge which was passed orally across generations. The real difference is the invention of the printing press and its successors right down to television and the internet. We no longer rely on our elders for knowledge. That has eroded respect. With each generation the erosion gets worse. When I was a child, my parents gave me a bike and a set of encyclopedia. They tested me on my knowledge and taught me other stuff too, which I can't remember now but I could look it up. Our children got bikes and encyclopedia too but they were growing up after Germaine Greer published "The Female Eunuch". They are Gen Xers. That means they became totally aware of female emancipation and the comcomitant male emancipation and other isms. Knowledge is a small part of life. You have heard "it's not what you know, it's who you know". Inherited wealth solves all problems for the wealthy because that inheritance includes every "who" who matters. For the rest of us getting on with people is what really matters. Without the right "who", survival is at risk. All the knowledge in the world is at our fingertips today and still our survival needs to be curated. So PSF Board members survival depends not on knowledge nor on having policies and codes of conduct but on the right "who". The survival of the Board and perhaps even the P language itself depends on elders. Elders have something which was well respected by earlier generations. That is lore which is steeped in experience. Leadership can be taught and learned. Experience has to be experienced. Young people almost by definition, don't have it. "Young" is obviously a relative term given one's perspective. Experience and respect for experience kept the oldest known culture on the planet functioning for a very long time. Even the advent of the web has not detracted from that respect. The PSF Board should reflect on their lack of respect for experience and try to retrieve any damage that lack of respect may have done to the very thing they were elected to look after. I'm old and I respect Tim's age and would not expect him to suffer the load of becoming BDFL but by golly that would be my preference. -- We recommend signal.org Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my signature and be sure it came from me. Your email software can handle signing. -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature.asc Type: application/pgp-signature Size: 495 bytes Desc: OpenPGP digital signature URL: From gheskett at shentel.net Wed Aug 14 23:09:34 2024 From: gheskett at shentel.net (gene heskett) Date: Wed, 14 Aug 2024 23:09:34 -0400 Subject: bring back nntp library to python3 In-Reply-To: References: <87bk1ug8vh.fsf@nosuchdomain.example.com> Message-ID: On 8/14/24 19:43, dn via Python-list wrote: > Recently there was an election for PSF members. Did 'everyone' participate? Of course not, I didn't simply because I don't know enough have a cogent opinion. But conversations like this are would seem to be good if they don't degenerate into name calling. As I look at my nintyieth in a month or so I always hope next year will be better. Please make it so. > What decision-making processes are usable in the face of such large > numbers - and how seriously are/would they be taken by 'the average > Python user'? > Cheers, Gene Heskett, CET. -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author, 1940) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis From o1bigtenor at gmail.com Thu Aug 15 07:24:52 2024 From: o1bigtenor at gmail.com (o1bigtenor) Date: Thu, 15 Aug 2024 06:24:52 -0500 Subject: troglodytes In-Reply-To: <1b33d01e-aa52-469e-8b19-97eec05a5c95@dewhirst.com.au> References: <614d43b1-c591-0596-714c-ebe50df42952@gmail.com> <1b33d01e-aa52-469e-8b19-97eec05a5c95@dewhirst.com.au> Message-ID: On Wed, Aug 14, 2024 at 9:06?PM Mike Dewhirst via Python-list < python-list at python.org> wrote: > On 14/08/2024 12:54 am, Michael Torrie via Python-list wrote: > > On 8/13/24 3:24 AM, Robin Becker via Python-list wrote: > >> I am clearly one of the troglodytes referred to in recent discussions > around the PSF. I've been around in python land > >> for far too long, my eyesight fails etc etc. > >> > >> I feel strongly that a miscarriage of justice has been made in the > 3-month banning of a famous python developer from > >> some areas of discourse. > >> > >> I have had my share of disagreements with others in the past and have > been sometimes violent or disrespectful in emails. > >> > >> I might have been in the kill list of some, but never banned from any > mailing lists. > >> > >> Honest dialogue is much better than imposed silence. > >> > >> -- grumblingly-yrs -- > >> Robin Becker > > Agreed. Here's a good summary of the issue: > > https://chrismcdonough.substack.com/p/the-shameful-defenestration-of-tim > > > > The PSF has really screwed this up. Really embarrassing, frankly. And > > sad. > > I read Chris McDonough's defence of Tim Peters and he has convinced me. > Not because of everything he said but because I have experience of > committees. And other things. > > The problem is generational. > > Later generations can see the faults of earlier generations in brilliant > hindsight. I certainly did. > > In my case, those earlier generations caused depressions and world wars. > That was pretty bad wasn't it? > > Can I blame my ancestors for that? My great-grandparents were born in > the second half of the 1800s; my grandparents in the late 1800s. They > were undoubtedly responsible for WW1 and the great depression wouldn't > you say? > > So my parents who grew up after WW1 and both fought in WW2 were forced > to give the best years of their lives to the worst of times. Not their > fault. In fact they were heroic to do all that and have me and my > siblings starting in their mid-twenties. > > Here's the rub: they had serious faults and I could see them clearly - > when I was in my twenties and having children of my own. > > I'll be 80 next year and I have a clearer perspective now. > > I now understand why the oldest known culture (60k+ years) survived > intact for so long including the last few thousand years of trading > between Australia and Asia and more recent centuries with Europe. It > wasn't entirely due to isolation. In fact there were hundreds of > separate nations and languages in Australia so no-one was all that > isolated. They had traders and diplomats and warriors just like the rest > of humanity. > > The difference isn't with them it is with us. We have lost what keeps > them together. They respect their elders. We don't. They had to because > their survival depended on lore and knowledge which was passed orally > across generations. > > The real difference is the invention of the printing press and its > successors right down to television and the internet. > > We no longer rely on our elders for knowledge. > > That has eroded respect. > > With each generation the erosion gets worse. When I was a child, my > parents gave me a bike and a set of encyclopedia. They tested me on my > knowledge and taught me other stuff too, which I can't remember now but > I could look it up. > > Our children got bikes and encyclopedia too but they were growing up > after Germaine Greer published "The Female Eunuch". They are Gen Xers. > That means they became totally aware of female emancipation and the > comcomitant male emancipation and other isms. > > Knowledge is a small part of life. You have heard "it's not what you > know, it's who you know". > > Inherited wealth solves all problems for the wealthy because that > inheritance includes every "who" who matters. For the rest of us getting > on with people is what really matters. Without the right "who", survival > is at risk. All the knowledge in the world is at our fingertips today > and still our survival needs to be curated. > > So PSF Board members survival depends not on knowledge nor on having > policies and codes of conduct but on the right "who". > > The survival of the Board and perhaps even the P language itself depends > on elders. > > Elders have something which was well respected by earlier generations. > That is lore which is steeped in experience. Leadership can be taught > and learned. Experience has to be experienced. Young people almost by > definition, don't have it. "Young" is obviously a relative term given > one's perspective. > > Experience and respect for experience kept the oldest known culture on > the planet functioning for a very long time. Even the advent of the web > has not detracted from that respect. > > The PSF Board should reflect on their lack of respect for experience and > try to retrieve any damage that lack of respect may have done to the > very thing they were elected to look after. > > I'm old and I respect Tim's age and would not expect him to suffer the > load of becoming BDFL but by golly that would be my preference. > > Well - - - I'm not 80 but I can concur with all of the historical stuff written here. Would also agree with the conclusions drawn re: board action. What short sighted overly politically correct thinking - - - the end result of these kind of brouhahas is hugely negative for any organization. Regards From mats at wichmann.us Thu Aug 15 11:27:31 2024 From: mats at wichmann.us (Mats Wichmann) Date: Thu, 15 Aug 2024 09:27:31 -0600 Subject: troglodytes In-Reply-To: <1b33d01e-aa52-469e-8b19-97eec05a5c95@dewhirst.com.au> References: <614d43b1-c591-0596-714c-ebe50df42952@gmail.com> <1b33d01e-aa52-469e-8b19-97eec05a5c95@dewhirst.com.au> Message-ID: <9270db0e-a061-4086-a95f-9f6d9c5a867b@wichmann.us> On 8/14/24 17:53, Mike Dewhirst via Python-list wrote: > > I read Chris McDonough's defence of Tim Peters and he has convinced me. > Not because of everything he said but because I have experience of > committees. And other things. > > The problem is generational. > > Later generations can see the faults of earlier generations in brilliant > hindsight. I certainly did. As another self-proclaimed troglodyte weighing in, I'm always suspicious of authority shifting with limited explanations, which seems to have been at the heart of the dispute. Questioning such is a responsibility many of us take seriously. However, I'd just like to point out: cultures evolve. Inclusivity is no longer obtained, as in our younger days, by saying "suck it up and get on with it". The steering council has this in their charter - PEP-13. These are not people who are making difficult choices for reasons of personal aggrandizement. From aotto1968 at t-online.de Tue Aug 20 03:47:25 2024 From: aotto1968 at t-online.de (aotto1968) Date: Tue, 20 Aug 2024 09:47:25 +0200 Subject: performance test on python with C API interface Message-ID: I would like to present you with a performance test where Python performs very well in relation to the NHI1 project regarding the integration of Python into C. -> results: http://thedev.nhi1.de/theLink/main/md_docs_2main_2README__PERFORMANCE.htm#README_PERFORMANCE -> project: http://thedev.nhi1.de/NHI1/main/ From me at sc1f1dan.com Tue Aug 20 18:26:39 2024 From: me at sc1f1dan.com (Daniel) Date: Tue, 20 Aug 2024 23:26:39 +0100 Subject: new here Message-ID: <87ikvuzv8g.fsf@rpi3> Hi folks - New here. I've perused some posts and haven't seen a posting FAQ for this NG. I'm learning python right now to realize some hobby goals I have regarding some smolnet services. What are the NG standards on pasting code in messages? Do yall prefer I post a pastebin link if it's over a certain number of lines? I know this isn't IRC - just asking. Daniel From python at mrabarnett.plus.com Tue Aug 20 19:12:00 2024 From: python at mrabarnett.plus.com (MRAB) Date: Wed, 21 Aug 2024 00:12:00 +0100 Subject: new here In-Reply-To: <87ikvuzv8g.fsf@rpi3> References: <87ikvuzv8g.fsf@rpi3> Message-ID: On 2024-08-20 23:26, Daniel via Python-list wrote: > Hi folks - > > New here. I've perused some posts and haven't seen a posting FAQ for > this NG. I'm learning python right now to realize some hobby goals I > have regarding some smolnet services. What are the NG standards on > pasting code in messages? Do yall prefer I post a pastebin link if it's > over a certain number of lines? I know this isn't IRC - just asking. > You'll find it rather quiet here because most activity has moved to here: https://discuss.python.org/ From avi.e.gross at gmail.com Tue Aug 20 23:16:48 2024 From: avi.e.gross at gmail.com (avi.e.gross at gmail.com) Date: Tue, 20 Aug 2024 23:16:48 -0400 Subject: new here In-Reply-To: References: <87ikvuzv8g.fsf@rpi3> Message-ID: <018c01daf378$8f73ffa0$ae5bfee0$@gmail.com> Matthew, It hasn't been THAT quiet here and I have not heard suggestions this group is going away. I did look at the online forum and at first was annoyed as I do not want to periodically log into various websites and prefer things to be consolidated in my email. But, it seems you can turn on email to selectively send things so it is also a mailing list. I am guessing one difference may be that it is not gatewayed to old newsgroups that periodically bring in folks who have disrupted. Another may be the level of moderation of messages that may help keep it more civil or even on-topic. I do wonder if the people at python.org want multiple forums. There is also one that sort of tutors people that obviously has an overlapping but different audience. Avi -----Original Message----- From: Python-list On Behalf Of MRAB via Python-list Sent: Tuesday, August 20, 2024 7:12 PM To: python-list at python.org Subject: Re: new here On 2024-08-20 23:26, Daniel via Python-list wrote: > Hi folks - > > New here. I've perused some posts and haven't seen a posting FAQ for > this NG. I'm learning python right now to realize some hobby goals I > have regarding some smolnet services. What are the NG standards on > pasting code in messages? Do yall prefer I post a pastebin link if it's > over a certain number of lines? I know this isn't IRC - just asking. > You'll find it rather quiet here because most activity has moved to here: https://discuss.python.org/ -- https://mail.python.org/mailman/listinfo/python-list From bowman at montana.com Tue Aug 20 21:14:34 2024 From: bowman at montana.com (rbowman) Date: 21 Aug 2024 01:14:34 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> Message-ID: On Tue, 20 Aug 2024 23:26:39 +0100, Daniel wrote: > New here. I've perused some posts and haven't seen a posting FAQ for > this NG. I'm learning python right now to realize some hobby goals I > have regarding some smolnet services. What are the NG standards on > pasting code in messages? Do yall prefer I post a pastebin link if it's > over a certain number of lines? I know this isn't IRC - just asking. Standards? This is usenet, the last remaining wild west. Good news: c.l.p isn't overrun by trolls. Bad news: c.l.p doesn't seem to be overrun by much of anybody. smolnet, as in things like https://small-tech.org/ Python certainly has the tools. You can even construct a web server on a Raspberry Pi Pico but I don't know any specifics about smolnet. The subreddit seems dead and I don't see anything but a few obscure github references. From bowman at montana.com Wed Aug 21 00:11:58 2024 From: bowman at montana.com (rbowman) Date: 21 Aug 2024 04:11:58 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <018c01daf378$8f73ffa0$ae5bfee0$@gmail.com> Message-ID: On Tue, 20 Aug 2024 23:16:48 -0400, avi.e.gross wrote: > I do wonder if the people at python.org want multiple forums. There is > also one that sort of tutors people that obviously has an overlapping > but different audience. https://realpython.com/ That's a mixed bag. Joining is $50 USD/month or $300/year but there are also many tutorials that can be accessed for free. Personally I can't justify the cost but it does add a community chat and Q&A with a 'Python Expert'. https://pycoders.com/ That's free and is more general information but some of the articles may be pertinent. @pycoders and @thepycoders on X tend to overlap the newsletter. From 2QdxY4RzWzUUiLuE at potatochowder.com Wed Aug 21 04:57:10 2024 From: 2QdxY4RzWzUUiLuE at potatochowder.com (2QdxY4RzWzUUiLuE at potatochowder.com) Date: Wed, 21 Aug 2024 03:57:10 -0500 Subject: new here In-Reply-To: <018c01daf378$8f73ffa0$ae5bfee0$@gmail.com> References: <87ikvuzv8g.fsf@rpi3> <018c01daf378$8f73ffa0$ae5bfee0$@gmail.com> Message-ID: On 2024-08-20 at 23:16:48 -0400, AVI GROSS via Python-list wrote: > I do wonder if the people at python.org want multiple forums. There is > also one that sort of tutors people that obviously has an overlapping > but different audience. $ python -m this The Zen of Python, by Tim Peters [...] There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. [...] From PythonList at DancesWithMice.info Wed Aug 21 06:21:28 2024 From: PythonList at DancesWithMice.info (dn) Date: Wed, 21 Aug 2024 22:21:28 +1200 Subject: new here In-Reply-To: <87ikvuzv8g.fsf@rpi3> References: <87ikvuzv8g.fsf@rpi3> Message-ID: <87a93dad-b0d2-4236-8264-e37253644c92@DancesWithMice.info> On 21/08/24 10:26, Daniel via Python-list wrote: > Hi folks - > > New here. I've perused some posts and haven't seen a posting FAQ for > this NG. I'm learning python right now to realize some hobby goals I > have regarding some smolnet services. What are the NG standards on > pasting code in messages? Do yall prefer I post a pastebin link if it's > over a certain number of lines? I know this isn't IRC - just asking. Welcome Daniel! Despite some seeming to think of sending you elsewhere, there are a number of people 'here' who regularly volunteer their time to help others. As with any interaction, the quality of information in the question directly impacts what can be offered in-response. More of us can help with (pure) Python questions. Moving into specialised areas may reduce the number who feel competent to answer. We'll value any contribution you may be able to offer, and will look forward to hearing of the projects you attempt... -- Regards, =dn From me at sc1f1dan.com Wed Aug 21 17:04:14 2024 From: me at sc1f1dan.com (Daniel) Date: Wed, 21 Aug 2024 22:04:14 +0100 Subject: new here References: <87ikvuzv8g.fsf@rpi3> <87a93dad-b0d2-4236-8264-e37253644c92@DancesWithMice.info> Message-ID: <875xrtziy9.fsf@rpi3> dn writes: > On 21/08/24 10:26, Daniel via Python-list wrote: >> Hi folks - >> New here. I've perused some posts and haven't seen a posting FAQ for >> this NG. I'm learning python right now to realize some hobby goals I >> have regarding some smolnet services. What are the NG standards on >> pasting code in messages? Do yall prefer I post a pastebin link if it's >> over a certain number of lines? I know this isn't IRC - just asking. > > > Welcome Daniel! > > Despite some seeming to think of sending you elsewhere, there are a > number of people 'here' who regularly volunteer their time to help > others. > > As with any interaction, the quality of information in the question > directly impacts what can be offered in-response. > > More of us can help with (pure) Python questions. Moving into > specialised areas may reduce the number who feel competent to answer. > > We'll value any contribution you may be able to offer, and will look > forward to hearing of the projects you attempt... Thanks man. Yeah I'm not going anywhere. If I don't get good answers from here then I'll go to IRC. I am on forums but tend to stay away from them unless I absolutely have to. I like newsgroups as they are - though I have noticed a massive drop in users ever since Google dropped their groups service. I also saw a minor drop in spam. I'm not too worried about the trolls either. D From me at sc1f1dan.com Wed Aug 21 17:15:37 2024 From: me at sc1f1dan.com (Daniel) Date: Wed, 21 Aug 2024 22:15:37 +0100 Subject: new here References: <87ikvuzv8g.fsf@rpi3> Message-ID: <871q2hzifa.fsf@rpi3> rbowman writes: > On Tue, 20 Aug 2024 23:26:39 +0100, Daniel wrote: > >> New here. I've perused some posts and haven't seen a posting FAQ for >> this NG. I'm learning python right now to realize some hobby goals I >> have regarding some smolnet services. What are the NG standards on >> pasting code in messages? Do yall prefer I post a pastebin link if it's >> over a certain number of lines? I know this isn't IRC - just asking. > > > Standards? This is usenet, the last remaining wild west. Good news: c.l.p > isn't overrun by trolls. Bad news: c.l.p doesn't seem to be overrun by > much of anybody. > I'm not worried much about large populations. i've been on massive forums and had less results than I did with an IRC channel with four users. > > smolnet, as in things like Lesser used protocols not known by many in the mainstream. Such as: gopher, gemini, finger, spartan, titan, etc. An example of use, here's a weather service tied to a finger. Put your city name as the user. This isn't mine, but it is inspiring. Example: finger miami at graph.no For all options, go to the help finger: finger help at graph.no Daniel From PythonList at DancesWithMice.info Wed Aug 21 21:43:59 2024 From: PythonList at DancesWithMice.info (dn) Date: Thu, 22 Aug 2024 13:43:59 +1200 Subject: new here In-Reply-To: <871q2hzifa.fsf@rpi3> References: <87ikvuzv8g.fsf@rpi3> <871q2hzifa.fsf@rpi3> Message-ID: On 22/08/24 09:15, Daniel via Python-list wrote: > rbowman writes: > >> On Tue, 20 Aug 2024 23:26:39 +0100, Daniel wrote: >> ... >> smolnet, as in things like > > Lesser used protocols not known by many in the mainstream. Such as: > > gopher, gemini, finger, spartan, titan, etc. > > An example of use, here's a weather service tied to a finger. Put your > city name as the user. This isn't mine, but it is inspiring. Example: > > finger miami at graph.no The OpSys on this machine no longer features finger (available for installation as an 'extra'). For Miami weather using a stock-standard web-browser, try: https://www.yr.no/en/content/2-4164138/meteogram.svg -- Regards, =dn From kevinmwilson1956 at yahoo.com Wed Aug 21 21:44:35 2024 From: kevinmwilson1956 at yahoo.com (Kevin M. Wilson) Date: Thu, 22 Aug 2024 01:44:35 +0000 (UTC) Subject: pdb: How to use the 'break' parameter? References: <1213218119.10733806.1724291075830.ref@mail.yahoo.com> Message-ID: <1213218119.10733806.1724291075830@mail.yahoo.com> break (Old_MacDonald:23 | name[indx] == 'd', indx = 4), based on the doc spec in python.org?(https://docs.python.org/3/library/pdb.html#debugger-commands) Cell In[1], line 20 break (Old_MacDonald:23 | name[indx] == 'd', indx = 4) ^ SyntaxError: invalid syntax I got one blank white screen when I entered the exact first line of the python.org-->b(reak)?[([filename:]lineno?|?function)?[,?condition]] I'd be obliged for an assist... KMW *************************************************** "When you pass through the waters, I will be with you: and when you?pass through the rivers, they will not sweep over?you. When?you walk?through the fire, you will not be burned: the flames will not set you ablaze."? ? ? Isaiah 43:2 From jsf80238 at gmail.com Wed Aug 21 22:06:33 2024 From: jsf80238 at gmail.com (Jason Friedman) Date: Wed, 21 Aug 2024 20:06:33 -0600 Subject: new here In-Reply-To: <871q2hzifa.fsf@rpi3> References: <87ikvuzv8g.fsf@rpi3> <871q2hzifa.fsf@rpi3> Message-ID: On Wed, Aug 21, 2024 at 4:04?PM Daniel via Python-list < python-list at python.org> wrote: > > An example of use, here's a weather service tied to a finger. Put your > city name as the user. This isn't mine, but it is inspiring. Example: > > finger miami at graph.no > > For all options, go to the help finger: > > finger help at graph.no Quite cool! From hjp-python at hjp.at Thu Aug 22 02:08:46 2024 From: hjp-python at hjp.at (Peter J. Holzer) Date: Thu, 22 Aug 2024 08:08:46 +0200 Subject: pdb: How to use the 'break' parameter? In-Reply-To: <1213218119.10733806.1724291075830@mail.yahoo.com> References: <1213218119.10733806.1724291075830.ref@mail.yahoo.com> <1213218119.10733806.1724291075830@mail.yahoo.com> Message-ID: <20240822060846.hojhyg25dql25ziu@hjp.at> On 2024-08-22 01:44:35 +0000, Kevin M. Wilson via Python-list wrote: > break (Old_MacDonald:23 | name[indx] == 'd', indx = 4), based on the doc spec in python.org?(https://docs.python.org/3/library/pdb.html#debugger-commands) > Cell In[1], line 20 > break (Old_MacDonald:23 | name[indx] == 'd', indx = 4) > ^ > SyntaxError: invalid syntax > I got one blank white screen when I entered the exact first line of the python.org-->b(reak)?[([filename:]lineno?|?function)?[,?condition]] You misunderstood the notation. The | means "or", it is not something you have to type literally. So the syntax is: either a line number (maybe in a different file) or a function name optionally followed by a condition after a comma So in your case probably something like: break Old_MacDonald:23, name[indx] == 'd' (I'm not sure what "indx = 4" was supposed to do. You can't assign inside of a condition.) hp -- _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp at hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From bowman at montana.com Thu Aug 22 00:18:14 2024 From: bowman at montana.com (rbowman) Date: 22 Aug 2024 04:18:14 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <871q2hzifa.fsf@rpi3> Message-ID: On Wed, 21 Aug 2024 22:15:37 +0100, Daniel wrote: > Lesser used protocols not known by many in the mainstream. Such as: > > gopher, gemini, finger, spartan, titan, etc. > > An example of use, here's a weather service tied to a finger. Put your > city name as the user. This isn't mine, but it is inspiring. Example: > > finger miami at graph.no > > For all options, go to the help finger: > > finger help at graph.no Thanks. Interesting. I was surprised a Norwegian site would have data for a small city in the US. I have a Python script that accesses the NOAA (National Oceanic and Atmospheric Administration) API and the data in the Meteogram appears to match well. fwiw, all that does is observation_url = f"https://api.weather.gov/stations/K{grid_id}/ observations/latest" response = requests.get(observation_url).json() using the Python 'requests' package and then parsing out the JSON. Implementing finger probably would be a straight socket connection. I don't know how useful this is: https://pypi.org/project/pyfinger/ I assume gopher is fron the archie, veronica, and jughead days. It appears straightforward. https://datatracker.ietf.org/doc/html/rfc1436 It's another use of a simple socket connection. https://docs.python.org/3/howto/sockets.html You may be able to gleam something from https://sr.ht/~lioploum/offpunk/ From bowman at montana.com Thu Aug 22 00:25:17 2024 From: bowman at montana.com (rbowman) Date: 22 Aug 2024 04:25:17 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <871q2hzifa.fsf@rpi3> Message-ID: On Thu, 22 Aug 2024 13:43:59 +1200, dn wrote: > The OpSys on this machine no longer features finger (available for > installation as an 'extra'). My Ubuntu 22.04 box has it, the Fedora 40 one doesn't. Ubuntu offers to install gopher, Fedora doesn't. Go figure. From bowman at montana.com Thu Aug 22 00:30:35 2024 From: bowman at montana.com (rbowman) Date: 22 Aug 2024 04:30:35 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <87a93dad-b0d2-4236-8264-e37253644c92@DancesWithMice.info> <875xrtziy9.fsf@rpi3> Message-ID: On Wed, 21 Aug 2024 22:04:14 +0100, Daniel wrote: > I am on forums but tend to stay away from them unless I absolutely have > to. I like newsgroups as they are - though I have noticed a massive drop > in users ever since Google dropped their groups service. I also saw a > minor drop in spam. Absolutely. It was sort of an intelligence test. I've used the server at the Freie Universit?t Berlin from back in the days when it was free rather than 10 Euros a year so life went on smoothly. From me at sc1f1dan.com Thu Aug 22 04:10:00 2024 From: me at sc1f1dan.com (Daniel) Date: Thu, 22 Aug 2024 09:10:00 +0100 Subject: new here References: <87ikvuzv8g.fsf@rpi3> <871q2hzifa.fsf@rpi3> Message-ID: <87jzg9x9k7.fsf@rpi3> rbowman writes: > On Wed, 21 Aug 2024 22:15:37 +0100, Daniel wrote: > >> Lesser used protocols not known by many in the mainstream. Such as: >> >> gopher, gemini, finger, spartan, titan, etc. >> >> An example of use, here's a weather service tied to a finger. Put your >> city name as the user. This isn't mine, but it is inspiring. Example: >> >> finger miami at graph.no >> >> For all options, go to the help finger: >> >> finger help at graph.no > > Thanks. Interesting. I was surprised a Norwegian site would have data for > a small city in the US. I have a Python script that accesses the NOAA > (National Oceanic and Atmospheric Administration) API and the data in the > Meteogram appears to match well. fwiw, all that does is > > observation_url = f"https://api.weather.gov/stations/K{grid_id}/ > observations/latest" > response = requests.get(observation_url).json() I think he uses a weather service API to call the data, and I'm sure they all share data across other national weather services. That's just a guess. > > using the Python 'requests' package and then parsing out the JSON. > Implementing finger probably would be a straight socket connection. I > don't know how useful this is: > > https://pypi.org/project/pyfinger/ > > I assume gopher is fron the archie, veronica, and jughead days. It appears > straightforward. I use gopher all the time, and the lynx browser supports it directly. If you have lynx, you can visit this gopher interface to Wikipedia: gopher://gopherpedia.com If you like Reddit, there's this gopher://gopherddit.com Of course it's read only, but if you're wishing to leisurely read posts on reddit in a super fast gopher page, you can. Right now, I'm focused on providing wiktionary.org services on gopher as well as finger. These are longterm projects since I can only learn python and code on spare time, which I have little. /snip I will be posting my coding questions in here. Thanks guys. Daniel From me at sc1f1dan.com Thu Aug 22 04:15:29 2024 From: me at sc1f1dan.com (Daniel) Date: Thu, 22 Aug 2024 09:15:29 +0100 Subject: new here References: <87ikvuzv8g.fsf@rpi3> <871q2hzifa.fsf@rpi3> Message-ID: <87frqxx9b2.fsf@rpi3> Jason Friedman writes: > On Wed, Aug 21, 2024 at 4:04?PM Daniel via Python-list < > python-list at python.org> wrote: > >> >> An example of use, here's a weather service tied to a finger. Put your >> city name as the user. This isn't mine, but it is inspiring. Example: >> >> finger miami at graph.no >> >> For all options, go to the help finger: >> >> finger help at graph.no > > > Quite cool! Right? It's so quick too. Just thinking how broad you can make it - accessing live data on the internet without the need of a broadband connection. If you want to check out the fingerverse finger fingerverse at happynetbox.com If you remember webrings, there's a finger ring, though there aren't alot of fingers registered on there yet. finger ring at thebackupbox.net Daniel From bowman at montana.com Thu Aug 22 15:49:21 2024 From: bowman at montana.com (rbowman) Date: 22 Aug 2024 19:49:21 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> Message-ID: 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. I think it's up to 3.4 in general and erratic past that. It doesn't have the match from 3.10. I don't think it has f-strings though it may have the walrus. There are workarounds but it can be annoying. I haven't worked with CircuitPython lately and don't know if it has pulled in later features. From avi.e.gross at gmail.com Thu Aug 22 16:07:28 2024 From: avi.e.gross at gmail.com (avi.e.gross at gmail.com) Date: Thu, 22 Aug 2024 16:07:28 -0400 Subject: new here In-Reply-To: References: <87ikvuzv8g.fsf@rpi3> <018c01daf378$8f73ffa0$ae5bfee0$@gmail.com> Message-ID: <005d01daf4ce$e9fc5740$bdf505c0$@gmail.com> After looking at what is going on in the other area, I am convinced that we need multiple boards with different ideas of what should be moderated or even ones where only very egregious behavior gets you banned. There is serious debate there about whether the group of people in charge of a more focused set of duties should even be given the ability to manage the mailing lists versus others. There are advantages to having a safe environment but not when the keepers want to stifle dissent or promote their own agendas as if everyone buys into them. I see hints there will be changes there as they were a tad tone deaf and did not seem to care if anyone objected. Let's keep this forum going. -----Original Message----- From: Python-list On Behalf Of Dan Sommers via Python-list Sent: Wednesday, August 21, 2024 4:57 AM To: python-list at python.org Subject: Re: new here On 2024-08-20 at 23:16:48 -0400, AVI GROSS via Python-list wrote: > I do wonder if the people at python.org want multiple forums. There is > also one that sort of tutors people that obviously has an overlapping > but different audience. $ python -m this The Zen of Python, by Tim Peters [...] There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. [...] -- https://mail.python.org/mailman/listinfo/python-list From bowman at montana.com Thu Aug 22 16:15:56 2024 From: bowman at montana.com (rbowman) Date: 22 Aug 2024 20:15:56 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <871q2hzifa.fsf@rpi3> <87jzg9x9k7.fsf@rpi3> Message-ID: On Thu, 22 Aug 2024 09:10:00 +0100, Daniel wrote: > If you have lynx, you can visit this gopher interface to Wikipedia: > > gopher://gopherpedia.com Yeah, that works and I could find Hillbilly Elegy (film). The text was fine but the 'Accolades' table was garbled. It came up on the Netflix recommendations and I watched it last night so when it said 'Search' I wanted to see what it would do. It came back with links to the book, the film, the Vances, and cast member bios. It's a subset of the Wiki 'Search in..' but still impressive. Python certainly will get the job done either on the client or server side. Being retro tech should make life easier than some of the web services frameworks. From PythonList at DancesWithMice.info Thu Aug 22 16:36:02 2024 From: PythonList at DancesWithMice.info (dn) Date: Fri, 23 Aug 2024 08:36:02 +1200 Subject: new here In-Reply-To: References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> Message-ID: <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> 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 did this enter the conversation/thread? Paul's 'contribution' does not even appear on the Archive... > I think it's up to 3.4 in general and erratic past that. It doesn't have > the match from 3.10. I don't think it has f-strings though it may have > the walrus. There are workarounds but it can be annoying. Two points: - it's cut-down to work on bare-metal which makes for low demands on resources, but commensurate shortage of the facilities we CPython developers take for-granted (ie may allow ourselves to find annoying) - it has f-strings, but frustrates those of us who prefer F-strings - the docs point-out that (compared with full-fat Python) it is less consistent across environments. Accordingly, worth reading the "Quick Reference for [your processor]" sections of the docs, eg R-Pi Pico version only has half of the ADC-methods. Once scale expectations to take into account the power of the processor, MicroPython goes-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] -- Regards, =dn From bowman at montana.com Thu Aug 22 23:43:15 2024 From: bowman at montana.com (rbowman) Date: 23 Aug 2024 03:43:15 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> Message-ID: 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 did this enter the conversation/thread? > > Paul's 'contribution' does not even appear on the Archive... I'm probably guilty. I mentioned in passing the older protocols like finger could even be implemented on something like the Pico W with MicroPython. I am confused by the cross-over to Python-list. I only read/post to comp.lang.python. Is that echoed to Python-list or vice versa? >> 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? I've only used CircuitPython on the Adafruit Playground Express. https://circuitpython.org/board/circuitplayground_express/ and MicroPython on the Pico W. Since then Adafruit has expanded their collection of boards and support them with CircuitPython. One difference that makes them hard to compare is the Express has quite a few on-board sensors like the Arduino Nano Sense 33, and interfaces to them are baked into CircuitPython. The Pico W has a wealth of I/O most doubling as I2C, PWM, or A/D with only a onboard LED for the mandatory 'hello world' blink code. MicroPython is more generic and you may have to import modules for specific external devices like the SSD1306 OLED display. That's easily done with Thonny or pipkin. As far as core Python I'd say they're similar. MicroPython is more generic and may require more work to set up where Adafruit can match the boards they have developed. As I said it's been a while but MicroPython has the _threading module so you can utilize both cores of the RP2040. Adafruit's new Feather has a RP2040 and like the Pico W assumes you'll be using the PIO to externals rather than anything onboard so CircuitPython probably has it. https://www.adafruit.com/product/4884 >From the horse's mouth: "There is great C/C++ support, unofficial (but really good) Arduino support, an official MicroPython port, and a CircuitPython port! We of course recommend CircuitPython because we think it's the easiest way to get started and it has support with most of our drivers, displays, sensors, and more, supported out of the box so you can follow along with our CircuitPython projects and tutorials." I don't know if Adafruit has a RP2350 board yet but they say CircuitPython will be even happier on the Pico 2. https://www.adafruit.com/product/6006 For better or worse there are a lot more choices now than fiddling around with the Arduino Uno back in the day. From PythonList at DancesWithMice.info Fri Aug 23 00:23:42 2024 From: PythonList at DancesWithMice.info (dn) Date: Fri, 23 Aug 2024 16:23:42 +1200 Subject: new here In-Reply-To: References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> Message-ID: <3f06d06e-732f-4afa-ba23-24aa1b742de4@DancesWithMice.info> 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 did this enter the conversation/thread? >> >> Paul's 'contribution' does not even appear on the Archive... > > I'm probably guilty. I mentioned in passing the older protocols like > finger could even be implemented on something like the Pico W with > MicroPython. The question arose because his message doesn't appear either in the conversation/email thread 'here', nor on the Archive. Perhaps not sent to the list? > I am confused by the cross-over to Python-list. I only read/post to > comp.lang.python. Is that echoed to Python-list or vice versa? As I understand it, posts to 'the list' may be made at comp.lang.python or by email. Once on the server, messages are reflected back to both. Thus, Thunderbird is not set-up to use the newsgroup and keeps complaining at me when it's asked to reply to both. So, all contributions (from me) enter the server via email. >>> 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? > > I've only used CircuitPython on the Adafruit Playground Express. > https://circuitpython.org/board/circuitplayground_express/ > and MicroPython on the Pico W. Since then Adafruit has expanded their > collection of boards and support them with CircuitPython. > > One difference that makes them hard to compare is the Express has quite a > few on-board sensors like the Arduino Nano Sense 33, and interfaces to > them are baked into CircuitPython. > > The Pico W has a wealth of I/O most doubling as I2C, PWM, or A/D with only > a onboard LED for the mandatory 'hello world' blink code. MicroPython is > more generic and you may have to import modules for specific external > devices like the SSD1306 OLED display. That's easily done with Thonny or > pipkin. Adding a display to the Pico-W is my next project... After that, gyros (am thinking it may not go so well, on balance... hah!). The Pico-W impresses. Its built-in Wi-Fi/Bluetooth capability makes life a lot easier (inside building use). Apart from the earlier comment, my biggest frustration has come from the lack of facilities in Thonny compared with PyCharm - but will pick-up skills there, no doubt. Conversely, (to having a separate radio-chip) I think I prefer the idea of being able to connect the Pico to whichever sensor(s) is/are actually-required. However, this is applied use - not learning or 'playing'. > As far as core Python I'd say they're similar. MicroPython is more generic > and may require more work to set up where Adafruit can match the boards > they have developed. > > As I said it's been a while but MicroPython has the _threading module so > you can utilize both cores of the RP2040. Adafruit's new Feather has a > RP2040 and like the Pico W assumes you'll be using the PIO to externals > rather than anything onboard so CircuitPython probably has it. > > https://www.adafruit.com/product/4884 > > From the horse's mouth: > > "There is great C/C++ support, unofficial (but really good) Arduino > support, an official MicroPython port, and a CircuitPython port! We of > course recommend CircuitPython because we think it's the easiest way to > get started and it has support with most of our drivers, displays, > sensors, and more, supported out of the box so you can follow along with > our CircuitPython projects and tutorials." Whilst agreeing with the "easiest way to get started" claim, it probably also leads to the assumption that it will (later) be easier to run out of capability. Hence, that MicroPython would be the better professional option - assuming one already knows Python. Yes, a degree of 'comparing apples with oranges' - and a continually-moving target! > I don't know if Adafruit has a RP2350 board yet but they say CircuitPython > will be even happier on the Pico 2. > https://www.adafruit.com/product/6006 No, out in the real-world, the Pico 2 is still vaporware. > For better or worse there are a lot more choices now than fiddling around > with the Arduino Uno back in the day. True. Hence the question. Thanks for the comments! -- Regards, =dn From max at alcyone.com Sun Aug 25 19:40:01 2024 From: max at alcyone.com (Erik Max Francis) Date: Sun, 25 Aug 2024 16:40:01 -0700 Subject: ANN: EmPy 4.2 -- a powerful, robust and mature templating system for Python Message-ID: # EmPy 4.2 release announcement I'm pleased to announce the release of EmPy 4.2. The 4._x_ series is a modernization of the software and a revamp of the EmPy system to update its feature set and make it more consistent with the latest Python versions and practices. EmPy 4._x_ was also relicensed to BSD. The 4._x_ series adds new markups, including inline comments, backquote literals, chained if-then-else extended expression, functional expressions, support for modern Pythonic controls, stringized and multiline significators, disabling and re-enabling output, named escapes, diacritics, icons, emojis, and customizable extension markups. It adds support for configuration objects (replacing options dictionaries); native support for Unicode, file buffering, reference counted `sys.stdout` proxies and error dispatchers and handlers; fixes several serious bugs; has a set of full unit and system tests, an extensive builtin help system; and the online documention has been rewritten and expanded. It also allows customizing the underlying interpreter core and full support for EmPy modules -- EmPy documents which can be imported as modules. Attempts have been made to make EmPy 4._x_ as backward compatible as is practical. Most common markup has not changed; the only changes being removal of `repr` (in favor of backquote literals) as well as literal close parenthesis, bracket and brace markup; in-place markup has changed syntax (to make way for emojis); and extension/custom markup is now parsed more sensibly. Most backward-incompatible changes are in the embedding interface. The `Interpreter` constructor and global `expand` function now require keyword arguments to prevent further backward compatibility problems, though effort has been made to make the behavior as backward compatible as possible. The supported environment variables have changed, as well as the filter, diversion and hook APIs, and options dictionaries no longer exist (in deference to configurations). For a comprehensive list of changes from 3._x_ to 4._x_, see: ## Introduction: Welcome to EmPy! [EmPy](http://www.alcyone.com/software/empy/) is a powerful, robust and mature templating system for inserting Python code in template text. EmPy takes a source document, processes it, and produces output. This is accomplished via expansions, which are signals to the EmPy system where to act and are indicated with markup. Markup is set off by a customizable prefix (by default the at sign, `@`). EmPy can expand arbitrary Python expressions, statements and control structures in this way, as well as a variety of additional special forms. The remaining textual data is sent to the output, allowing Python to be used in effect as a markup language. EmPy also supports hooks, which can intercept and modify the behavior of a running interpreter; diversions, which allow recording and playback; filters, which are dynamic and can be chained together; and a dedicated user-customizable callback markup. The system is highly configurable via command line options, configuration files, and environment variables. EmPy documents can also be imported as modules, and an extensive API is also available for embedding EmPy functionality in your own Python programs. EmPy also has a supplemental library for additional non-essential features (`emlib`), a documentation building library used to create this documentation (`emdoc`), and an extensive help system (`emhelp`) which can be queried from the command line with the main executable `em.py` (`-h/--help`, `-H/--topics=TOPICS`). The base EmPy interpreter can function with only the `em.py`/`em` file/module available. EmPy can be used in a variety of roles, including as a templating system, a text processing system (preprocessing and/or postprocessing), a simple macro processor, a frontend for a content management system, annotating documents, for literate programming, as a souped-up text encoding converter, a text beautifier (with macros and filters), and many other purposes. ### Markup overview Expressions are embedded in text with the `@(...)` notation; variations include conditional expressions with `@(...?...!...)` and the ability to handle thrown exceptions with `@(...$...)`. As a shortcut, simple variables and expressions can be abbreviated as `@variable`, `@object.attribute`, `@sequence[index]`, `@function(arguments...)`, `@function{markup}{...}` and combinations. Full-fledged statements are embedded with `@{...}`. Control flow in terms of conditional or repeated expansion is available with `@[...]`. A `@` followed by any whitespace character (including a newline) expands to nothing, allowing string concatenations and line continuations. Line comments are indicated with `@#...` including the trailing newline. `@*...*` allows inline comments. Output can be disabled and re-enabled with `@-...` and `@+...`. Escapes are indicated with `@\...`; diacritics with `@^...`; icons with `@|...`; and emoji with `@:...:`. `@%...`, `@%!...`, `@%%...%%` and `@%%!...%%` indicate "significators," which are distinctive forms of variable assignment intended to specify document metadata in a format easy to parse externally. In-place expressions are specified with `@$...$...$`. Context name and line number changes can be made with `@?...` and `@!...`, respectively. A set of markups (`@((...))`, `@[[...]]`, `@{{...}}`, `@<...>`) are customizable by the user and can be used for any desired purpose. `` @`...` `` allows literal escaping of any EmPy markup. Output can be toggled on and off with `@+` and `@-`, respectively. And finally, a `@@` sequence (the prefix repeated once) expands to a single literal at sign. The prefix defaults to `@` but can be changed with the command line option `-p/--prefix=CHAR` (_environment variable:_ `EMPY_PREFIX`, _configuration variable:_ `prefix`). ### Getting the software The current version of EmPy is 4.2. The official URL for this Web site is . The latest version of the software is available in a tarball here: . The software can be installed through PIP via this shell command: ``` % python3 -m pip install empy ``` For information about upgrading from 3._x_ to 4._x_, see . ### Requirements EmPy works with any modern version of Python. Python version 3._x_ is expected to be the default and all source file references to the Python interpreter (_e.g._, the bangpath of the .py scripts) use `python3`. EmPy also has legacy support for versions of Python going back all the way to 2.4, with special emphasis on 2.7 regardless of its end-of-life status. It has no dependency requirements on any third-party modules and can run directly off of a stock Python interpreter. EmPy will run on any operating system with a full-featured Python interpreter; this includes, but is probably not limited to, the operating systems Linux, Windows and macOS (Darwin). Using EmPy requires knowledge of the [Python language](https://www.python.org/). EmPy is compatible with many different Python implementations, interpreter variants, packaging systems, and enhanced shells: | Variant | Supported versions | Description | | --- | --- | --- | | [CPython](https://www.python.org/) | 2.4 and up | Standard implementation in C | | [PyPy](https://www.pypy.org/) | 2.7 and up | Implementation with just-in-time compiler | | [Stackless Python](https://github.com/stackless-dev/stackless/wiki/) | 2.4 and up | Implementation supporting microthreading | | [IronPython](https://ironpython.net/) | 2.7 and up | Implementation for .NET CLR and Mono | | [Jython](https://www.jython.org/) | 2.5 to 2.7 (and up?) | Implementation for JVM | | [ActiveState Python](https://www.activestate.com/products/python/) | 2.7 and up | Secure supply chain open source solution | | [eGenix PyRun](https://www.egenix.com/products/python/PyRun/) | 2.5 and up | One-file, no-installation CPython environment | | [WinPython](https://winpython.github.io/) | 3.0 and up | Portable Scientific Python for Windows | | [PortablePython](https://portablepython.com/) | 2.7 and up | Minimalistic Python distribution for Windows | | [IDLE](https://docs.python.org/3/library/idle.html) | all | Python's Integrated Development and Learning Environment | | [IPython](https://ipython.org/) | all | Powerful interactive shell; kernel for [Jupyter](https://jupyter.org/) | EmPy is also compatible with scaled-down implementations of Python, provided they support the set of standard modules that EmPy requires, namely: - `codecs` - `copy` - `getopt` - `os` - `platform` - `re` - `sys` - `unicodedata` Only a few .py module file(s) are needed to use EmPy; they can be installed system-wide through a distribution package, via PIP, or just dropped into any desired directory in the `PYTHONPATH` (as a module) and/or `PATH` (as an executable). A minimal installation need only install the em.py file, either as an importable module or an executable, or both, depending on the user's needs. EmPy also has optional support for several [third-party emoji modules](#third-party-emoji-modules); see [Emoji markup](#emoji-markup) for details. The testing system included (the test.sh script and the tests and suites directories) is intended to run on Unix-like systems with a Bourne-like shell (_e.g._, sh, bash, zsh, etc.). EmPy is routinely tested with all supported versions of all available interpreters. If you find an incompatibility with your Python interpreter or operating system, [let me know](#reporting-bugs). ### License This software is licensed under [BSD (3-Clause)](https://opensource.org/licenses/bsd-3-clause/). ### Recent release history (since 3._x_) {#latest-release} 4.2 (2024 Aug 25) : Add module support; add support for disabling output and switch markup; add support for reconfiguring stdin/stdout; support repeated curly braces with functional expression; add backward-compatible `Case` abstraction for match markup; add more preprocessing and postprocessing commands via command line options. 4.1 (2024 Mar 24) : Add support for extension markup `@((...))`, `@[[...]]`, `@{{...}}`, `@<...>`, etc., with custom callbacks retained for backward compatibility; add `@[match]` control support; add interpreter cores for overriding interpreter behavior; add more command line option toggles; add notion of verbose/brief errors; more uniform error message formatting; various documentation updates. {#last-minor-release} 4.0.1 (2023 Dec 24) : Add root context argument, serializers, and idents to interpreter; fix `setContext...` methods so they also modify the currents stack; better backward compatibility for `expand` function and `CompatibilityError`; fix inconsistent stack usage with `expand` method; add error dispatchers, cleaner error handling and `ignoreErrors`; have `expand` method/function raise exceptions to caller; eliminate need for `FullContext` class distinct from `Context`; support comments in "clean" controls; add `--no-none-symbol` option; add clearer errors for removed literal markup; add `Container` support class in `emlib`; hide non-standard proxy attributes and methods; support string errors (why not); update and expand tests; help subsystem and documentation updates. 4.0 (2023 Nov 29) : A major revamp, refresh, and modernization. Major new features include inline comments `@*...*`; backquote literals `` @`...` ``; chained if-then-else expressions; functional expressions `@f{...}`; full support for `@[try]`, `@[while ...]` and `@[with ...]` control markup; `@[defined ...]` control markup; stringized and multiline significators; named escapes `@\^{...}`; diacritics `@^...`; icons `@|...`; emojis `@:...:`; configurations; full Unicode and file buffering support; proxy now reference counted; hooks can override behavior; many bug fixes; an extensive builtin help system (`emhelp`); and rewritten and expanded documentation in addition to a dedicated module (`emdoc`). Changes include relicensing to BSD, interpreter constructor now requires keyword arguments, `-d/--delete-on-error` instead of "fully buffered files"; cleaned up environment variables; "repr" markup replaced with emoji markup; remove literal markups `@)`, `@]`, `@}`; context line markup `@!...` no longer pre-adjusts line; custom markup `@<...>` now parsed more sensibly; filter shortcuts removed; context now track column and character count; auxiliary classes moved to `emlib` module; use `argv` instead of `argc` for interpreter arguments. See [Full list of changes between EmPy 3._x_ and 4.0](http://www.alcyone.com/software/empy/ANNOUNCE.html#all-changes) for a more comprehensive list. -- Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && Skype erikmaxfrancis Of all the supposed virtues, faith must be the most overrated. -- Christopher Hitchens From bowman at montana.com Fri Aug 23 01:21:48 2024 From: bowman at montana.com (rbowman) Date: 23 Aug 2024 05:21:48 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> <3f06d06e-732f-4afa-ba23-24aa1b742de4@DancesWithMice.info> Message-ID: On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote: > Adding a display to the Pico-W is my next project... After that, gyros > (am thinking it may not go so well, on balance... hah!). https://toptechboy.com/two-axis-tilt-meter-displaying-pitch-and-roll- using-an-mpu6050-on-the-raspberry-pi-pico-w/ You might have to go back a lesson or two for the lead up. As he generally says in the intro most of what he uses is from the Sunfounder Kepler kit. It has a standard LCD display but he suggested buying the OLED separately and used it for Lissajous patterns and other fancier stuff. It's not a bad series although he can be long-winded and his Python style definitely isn't PEP8 friendly. https://toptechboy.com/ He switched to the Arduino Uno R4 after the IR controller/NeoPixel Pico project and I don't know if he intends to go back to the Pico. He uses Thonny but I use the MicroPython extension in VS Code. Lately I've been using Code for everything. Mostly I work on Linux boxes but it's all the same on Windows. There is a PlatformIO extension that works with Arduino and other boards. PyLance upsets some because it's a MS product but it works well too. I've used PyCharm and like it but I also work on C, .NET, Angular, and other projects and Code gives me a uniform IDE. From bowman at montana.com Fri Aug 23 01:38:22 2024 From: bowman at montana.com (rbowman) Date: 23 Aug 2024 05:38:22 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> <87v7zsaqvd.fsf@nightsong.com> Message-ID: On Thu, 22 Aug 2024 19:56:54 -0700, Paul Rubin wrote: > With MicroPython on the Pico, you use some command line utility to > transfer files instead, but it is no big deal. Loading the UF2 is easy. https://www.raspberrypi.com/documentation/microcontrollers/ micropython.html I use VS Code with the MicroPython extension so when the board is plugged in it shows up as ttyACM0 or COM something I think on Windows. If you need a package for a peripheral the file structure on the actually device shows up so you can copy it to the lib directory. https://pypi.org/project/pipkin/ pipkin is the command line utility. Thonny isn't my favorite IDE but it does make life easy: https://projects.raspberrypi.org/en/projects/getting-started-with-the- pico/2 From mm+usenet-es at dorfdsl.de Fri Aug 23 09:09:06 2024 From: mm+usenet-es at dorfdsl.de (Marco Moock) Date: Fri, 23 Aug 2024 15:09:06 +0200 Subject: new here In-Reply-To: <87ikvuzv8g.fsf@rpi3> References: <87ikvuzv8g.fsf@rpi3> Message-ID: On 20.08.2024 um 23:26 Uhr Daniel wrote: > New here. I've perused some posts and haven't seen a posting FAQ for > this NG. I'm learning python right now to realize some hobby goals I > have regarding some smolnet services. What are the NG standards on > pasting code in messages? Do yall prefer I post a pastebin link if > it's over a certain number of lines? I know this isn't IRC - just > asking. Welcome! Pastebin and other stuff has the disadvantage that the content might be removed later. What about pasting it under your actual message if it is really too long? -- kind regards Marco From Keith.S.Thompson+u at gmail.com Sat Aug 24 19:04:47 2024 From: Keith.S.Thompson+u at gmail.com (Keith Thompson) Date: Sat, 24 Aug 2024 16:04:47 -0700 Subject: new here References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> Message-ID: <87ttf9frow.fsf_-_@nosuchdomain.example.com> Lawrence D'Oliveiro writes: > On 23 Aug 2024 03:43:15 GMT, rbowman wrote: >> I am confused by the cross-over to Python-list. I only read/post to >> comp.lang.python. Is that echoed to Python-list or vice versa? > > This has been happening, without asking our permission, for years. The comp.lang.python newsgroup and the Python-list mailing list are bidirectionally gatewayed. Both are public. Why is that a problem for you? Whose permission do you think is needed? https://mail.python.org/mailman/listinfo/python-list -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u at gmail.com void Void(void) { Void(); } /* The recursive call of the void */ From avi.e.gross at gmail.com Sun Aug 25 21:29:30 2024 From: avi.e.gross at gmail.com (avi.e.gross at gmail.com) Date: Sun, 25 Aug 2024 21:29:30 -0400 Subject: new here In-Reply-To: References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> <3f06d06e-732f-4afa-ba23-24aa1b742de4@DancesWithMice.info> Message-ID: <009a01daf757$663b2ae0$32b180a0$@gmail.com> If everyone will pardon my curiosity, who and what purposes are these smaller environments for and do many people use them? I mean the price of a typical minimal laptop is not a big deal today. So are these for some sort of embedded uses? I read about them ages ago but wonder ... -----Original Message----- From: Python-list On Behalf Of rbowman via Python-list Sent: Friday, August 23, 2024 1:22 AM To: python-list at python.org Subject: Re: new here On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote: > Adding a display to the Pico-W is my next project... After that, gyros > (am thinking it may not go so well, on balance... hah!). https://toptechboy.com/two-axis-tilt-meter-displaying-pitch-and-roll- using-an-mpu6050-on-the-raspberry-pi-pico-w/ You might have to go back a lesson or two for the lead up. As he generally says in the intro most of what he uses is from the Sunfounder Kepler kit. It has a standard LCD display but he suggested buying the OLED separately and used it for Lissajous patterns and other fancier stuff. It's not a bad series although he can be long-winded and his Python style definitely isn't PEP8 friendly. https://toptechboy.com/ He switched to the Arduino Uno R4 after the IR controller/NeoPixel Pico project and I don't know if he intends to go back to the Pico. He uses Thonny but I use the MicroPython extension in VS Code. Lately I've been using Code for everything. Mostly I work on Linux boxes but it's all the same on Windows. There is a PlatformIO extension that works with Arduino and other boards. PyLance upsets some because it's a MS product but it works well too. I've used PyCharm and like it but I also work on C, .NET, Angular, and other projects and Code gives me a uniform IDE. -- https://mail.python.org/mailman/listinfo/python-list From pf at pfortin.com Sun Aug 25 21:38:22 2024 From: pf at pfortin.com (Pierre Fortin) Date: Sun, 25 Aug 2024 21:38:22 -0400 Subject: Is there a better way? [combining f-string, thousands separator, right align] In-Reply-To: References: Message-ID: <20240825213822.0b161c22@pfortin.com> On Sun, 25 Aug 2024 15:12:20 GMT Gilmeh Serda via Python-list wrote: >Subject explains it, or ask. > >This is a bloody mess: > >>>> s = "123456789" # arrives as str >>>> f"{f'{int(s):,}': >20}" >' 123,456,789' > Oops.. forgot comma f"{int(s):>20,}" From python at mrabarnett.plus.com Sun Aug 25 21:55:03 2024 From: python at mrabarnett.plus.com (MRAB) Date: Mon, 26 Aug 2024 02:55:03 +0100 Subject: Is there a better way? [combining f-string, thousands separator, right align] In-Reply-To: References: Message-ID: <85ea3168-cd47-4f06-97f8-5f98ee21c8b9@mrabarnett.plus.com> On 2024-08-25 16:12, Gilmeh Serda via Python-list wrote: > Subject explains it, or ask. > > This is a bloody mess: > >>>> s = "123456789" # arrives as str >>>> f"{f'{int(s):,}': >20}" > ' 123,456,789' > You don't need to format twice; you can combine them: >>> s = "123456789" >>> f'{int(s): >20,}' ' 123,456,789' or if you rely on default behaviour: >>> f'{int(s):20,}' ' 123,456,789' From PythonList at DancesWithMice.info Sun Aug 25 22:00:56 2024 From: PythonList at DancesWithMice.info (dn) Date: Mon, 26 Aug 2024 14:00:56 +1200 Subject: new here In-Reply-To: References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> <87v7zsaqvd.fsf@nightsong.com> Message-ID: <6febb3bc-791f-4d9b-80e5-12aa2bd4cbd4@DancesWithMice.info> It appears there were some delays in the email/servers. Thanks for this (and earlier) ideas and advice! On 23/08/24 17:38, rbowman via Python-list wrote: > On Thu, 22 Aug 2024 19:56:54 -0700, Paul Rubin wrote: > >> With MicroPython on the Pico, you use some command line utility to >> transfer files instead, but it is no big deal. > > Loading the UF2 is easy. > > https://www.raspberrypi.com/documentation/microcontrollers/ > micropython.html > > I use VS Code with the MicroPython extension so when the board is plugged > in it shows up as ttyACM0 or COM something I think on Windows. If you need > a package for a peripheral the file structure on the actually device shows > up so you can copy it to the lib directory. > > https://pypi.org/project/pipkin/ > > pipkin is the command line utility. Thonny isn't my favorite IDE but it > does make life easy: > > https://projects.raspberrypi.org/en/projects/getting-started-with-the- > pico/2 -- Regards, =dn From python at mrabarnett.plus.com Sun Aug 25 22:05:29 2024 From: python at mrabarnett.plus.com (MRAB) Date: Mon, 26 Aug 2024 03:05:29 +0100 Subject: new here In-Reply-To: <009a01daf757$663b2ae0$32b180a0$@gmail.com> References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> <3f06d06e-732f-4afa-ba23-24aa1b742de4@DancesWithMice.info> <009a01daf757$663b2ae0$32b180a0$@gmail.com> Message-ID: On 2024-08-26 02:29, AVI GROSS via Python-list wrote: > If everyone will pardon my curiosity, who and what purposes are these > smaller environments for and do many people use them? > > I mean the price of a typical minimal laptop is not a big deal today. So are > these for some sort of embedded uses? > > I read about them ages ago but wonder ... > A Raspberry Pi Pico W costs less than ?5, is a lot smaller, and has a much lower power consumption than a laptop, so if it's good enough for the purpose (embedded controller), why use a laptop? That's overkill! > > -----Original Message----- > From: Python-list On > Behalf Of rbowman via Python-list > Sent: Friday, August 23, 2024 1:22 AM > To: python-list at python.org > Subject: Re: new here > > On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote: > >> Adding a display to the Pico-W is my next project... After that, gyros >> (am thinking it may not go so well, on balance... hah!). > > https://toptechboy.com/two-axis-tilt-meter-displaying-pitch-and-roll- > using-an-mpu6050-on-the-raspberry-pi-pico-w/ > > You might have to go back a lesson or two for the lead up. As he generally > says in the intro most of what he uses is from the Sunfounder Kepler kit. > It has a standard LCD display but he suggested buying the OLED separately > and used it for Lissajous patterns and other fancier stuff. > > It's not a bad series although he can be long-winded and his Python style > definitely isn't PEP8 friendly. > > https://toptechboy.com/ > > He switched to the Arduino Uno R4 after the IR controller/NeoPixel Pico > project and I don't know if he intends to go back to the Pico. He uses > Thonny but I use the MicroPython extension in VS Code. Lately I've been > using Code for everything. Mostly I work on Linux boxes but it's all the > same on Windows. There is a PlatformIO extension that works with Arduino > and other boards. PyLance upsets some because it's a MS product but it > works well too. I've used PyCharm and like it but I also work on C, .NET, > Angular, and other projects and Code gives me a uniform IDE. From pf at pfortin.com Sun Aug 25 21:34:51 2024 From: pf at pfortin.com (Pierre Fortin) Date: Sun, 25 Aug 2024 21:34:51 -0400 Subject: Is there a better way? [combining f-string, thousands separator, right align] In-Reply-To: References: Message-ID: <20240825213451.7f786f57@pfortin.com> On Sun, 25 Aug 2024 15:12:20 GMT Gilmeh Serda via Python-list wrote: >Subject explains it, or ask. > >This is a bloody mess: > >>>> s = "123456789" # arrives as str >>>> f"{f'{int(s):,}': >20}" >' 123,456,789' > f"{s:>20}" From avi.e.gross at gmail.com Sun Aug 25 23:38:45 2024 From: avi.e.gross at gmail.com (avi.e.gross at gmail.com) Date: Sun, 25 Aug 2024 23:38:45 -0400 Subject: new here In-Reply-To: References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> <3f06d06e-732f-4afa-ba23-24aa1b742de4@DancesWithMice.info> <009a01daf757$663b2ae0$32b180a0$@gmail.com> Message-ID: <040701daf769$746b8080$5d428180$@gmail.com> Thank you Michael. Embedded Controllers are something I personally have never had to deal with, except as an inviable part of things I use. But, yes, things like that when cheap enough, make plenty of sense. -----Original Message----- From: Python-list On Behalf Of MRAB via Python-list Sent: Sunday, August 25, 2024 10:05 PM To: python-list at python.org Subject: Re: new here On 2024-08-26 02:29, AVI GROSS via Python-list wrote: > If everyone will pardon my curiosity, who and what purposes are these > smaller environments for and do many people use them? > > I mean the price of a typical minimal laptop is not a big deal today. So are > these for some sort of embedded uses? > > I read about them ages ago but wonder ... > A Raspberry Pi Pico W costs less than ?5, is a lot smaller, and has a much lower power consumption than a laptop, so if it's good enough for the purpose (embedded controller), why use a laptop? That's overkill! > > -----Original Message----- > From: Python-list On > Behalf Of rbowman via Python-list > Sent: Friday, August 23, 2024 1:22 AM > To: python-list at python.org > Subject: Re: new here > > On Fri, 23 Aug 2024 16:23:42 +1200, dn wrote: > >> Adding a display to the Pico-W is my next project... After that, gyros >> (am thinking it may not go so well, on balance... hah!). > > https://toptechboy.com/two-axis-tilt-meter-displaying-pitch-and-roll- > using-an-mpu6050-on-the-raspberry-pi-pico-w/ > > You might have to go back a lesson or two for the lead up. As he generally > says in the intro most of what he uses is from the Sunfounder Kepler kit. > It has a standard LCD display but he suggested buying the OLED separately > and used it for Lissajous patterns and other fancier stuff. > > It's not a bad series although he can be long-winded and his Python style > definitely isn't PEP8 friendly. > > https://toptechboy.com/ > > He switched to the Arduino Uno R4 after the IR controller/NeoPixel Pico > project and I don't know if he intends to go back to the Pico. He uses > Thonny but I use the MicroPython extension in VS Code. Lately I've been > using Code for everything. Mostly I work on Linux boxes but it's all the > same on Windows. There is a PlatformIO extension that works with Arduino > and other boards. PyLance upsets some because it's a MS product but it > works well too. I've used PyCharm and like it but I also work on C, .NET, > Angular, and other projects and Code gives me a uniform IDE. -- https://mail.python.org/mailman/listinfo/python-list From PythonList at DancesWithMice.info Mon Aug 26 04:42:32 2024 From: PythonList at DancesWithMice.info (dn) Date: Mon, 26 Aug 2024 20:42:32 +1200 Subject: Is there a better way? [combining f-string, thousands separator, right align] In-Reply-To: References: Message-ID: <09102d57-41cd-4428-b96f-d69e2ffe9c95@DancesWithMice.info> On 26/08/24 03:12, Gilmeh Serda via Python-list wrote: > Subject explains it, or ask. > > This is a bloody mess: > >>>> s = "123456789" # arrives as str >>>> f"{f'{int(s):,}': >20}" > ' 123,456,789' With recent improvements to the expressions within F-strings, we can separate the string from the format required. (reminiscent of FORTRAN which had both WRITE and FORMAT statements, or for that matter HTML which states the 'what' and CSS the 'how') Given that the int() instance-creation has a higher likelihood of data-error, it is recommended that it be a separate operation for ease of fault-finding - indeed some will want to wrap it with try...except. >>> s = "123456789" # arrives as str >>> s_int = int( s ) # makes the transformation obvious and distinct >>> s_format = ">20," # define how the value should be presented >>> F"{s_int:{s_format}}" ' 123,456,789' Further, some of us don't like 'magic-constants', hence (previously): >>> S_FIELD_WIDTH = 20 >>> s_format = F">{S_FIELD_WIDTH}," and if we really want to go over-board: >>> RIGHT_JUSTIFIED = ">" >>> THOUSANDS_SEPARATOR = "," >>> s_format = F"{RIGHT_JUSTIFIED}{S_FIELD_WIDTH}{THOUSANDS_SEPARATOR}" or (better) because right-justification is the default for 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 From 2QdxY4RzWzUUiLuE at potatochowder.com Mon Aug 26 07:00:32 2024 From: 2QdxY4RzWzUUiLuE at potatochowder.com (2QdxY4RzWzUUiLuE at potatochowder.com) Date: Mon, 26 Aug 2024 06:00:32 -0500 Subject: Is there a better way? [combining f-string, thousands separator, right align] In-Reply-To: <09102d57-41cd-4428-b96f-d69e2ffe9c95@DancesWithMice.info> References: <09102d57-41cd-4428-b96f-d69e2ffe9c95@DancesWithMice.info> Message-ID: 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_SEPARATOR}" > > or (better) because right-justification is the default for 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! And then you'll need a parser, many of whose Unique Challenges? aren't even apparent until you start parsing files from actual users, and you'll still need some sort of fallback in the code anyway for the case that s_format can't be parsed (for whatever reason). Isn't a config file what just caused the global CrowdStrike outage? ;-) That said, I understand that report generators are a thing, not to mention RPG (https://en.wikipedia.org/wiki/IBM_RPG). Okay, sorry; I'll just crawl back into the hole from whence I came. From PythonList at DancesWithMice.info Mon Aug 26 16:27:11 2024 From: PythonList at DancesWithMice.info (dn) Date: Tue, 27 Aug 2024 08:27:11 +1200 Subject: Is there a better way? [combining f-string, thousands separator, right align] In-Reply-To: References: <09102d57-41cd-4428-b96f-d69e2ffe9c95@DancesWithMice.info> Message-ID: <96f83373-c7ad-4020-96b0-51d956cf433d@DancesWithMice.info> 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_SEPARATOR}" >> >> or (better) because right-justification is the default for 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! > > And then you'll need a parser, many of whose Unique Challenges? aren't > even apparent until you start parsing files from actual users, and > you'll still need some sort of fallback in the code anyway for the case > that s_format can't be parsed (for whatever reason). > > Isn't a config file what just caused the global CrowdStrike outage? ;-) > > That said, I understand that report generators are a thing, not to > mention RPG (https://en.wikipedia.org/wiki/IBM_RPG). > > Okay, sorry; I'll just crawl back into the hole from whence I came. Not at all. Please continue to question/ask/suggest! This is a valid point. There are costs and benefits (trade-offs) to all decisions! That said, writing one's own parser would become a veritable can of worms/rabbit hole. Here be dragons! Similarly, explaining this takes longer than writing the example itself! Older Windows users will know about .ini files, and Linux Admins are familiar with .conf files. Many of us are already using JSON or YAML formats. Any of these (and more) could be pressed into service, as above. At the 'top end', there are also whole libraries devoted to establishing application configuration or "environments": default values, config files, command-line options, user-input... Have switched to using Python-poetry, which replaces packaging methods such as setuptools (as well as virtual-environment tools). It takes its project configuration specifications from a pyproject.toml file. So, for a few projects lately, I've been using .toml for application-config as well. However, I have to say, this more from an attempt at consistency than a decision of logic. (critique welcome) That said, a setup.py configuration, took the form: setup( name='demo_project', version='1.1.0', packages=find_packages(), install_requires=[ 'requests', 'numpy', ... ], entry_points={ ... Accordingly, it offers an example of the simplest format (for us), and one which has a zero-learning pre-requisite. At execution-time, the moment such a config is import-ed, a syntax-error will immediately bring proceedings to a halt! I have some stats-wonks as clients. They dabble in programming, but (fortunately) realise their limitations. (usually!) The boss has had to ban them from 'improving' my code ($paid to be an improvement on their usual quality), but including a .py configuration/options file has proven to be an honor-preserving compromise. Of course, they manage their own runs, adjusting parameters as they go. So, any errors are their own, and they can fix themselves (without anyone else knowing!). Such would not work in many?most other environments - children: do not try this at home! An irritation for those of us who have to delve into projects after they've been written, is a git-history full of the sorts of user-tweaking changes vilified earlier. Putting user-config into a separate file, even a separate sub-directory, makes it easy to spot which updates to ignore, and thus, which to consider! PS the reason why CrowdStrike was not the end of humanity as we know it, (and only that of those who only know MSFT's eco-system) is because the majority of the world's Internet servers run Linux - including Azure (brings to mind the old saw: the package said "runs on Windows-95 or better" so I installed it on Linux!) Joking aside, we (virtuous ones) ALWAYS test BEFORE release. Correct? -- Regards, =dn From bowman at montana.com Sun Aug 25 22:58:25 2024 From: bowman at montana.com (rbowman) Date: 26 Aug 2024 02:58:25 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> <3f06d06e-732f-4afa-ba23-24aa1b742de4@DancesWithMice.info> <009a01daf757$663b2ae0$32b180a0$@gmail.com> Message-ID: On Sun, 25 Aug 2024 21:29:30 -0400, avi.e.gross wrote: > If everyone will pardon my curiosity, who and what purposes are these > smaller environments for and do many people use them? > > I mean the price of a typical minimal laptop is not a big deal today. So > are these for some sort of embedded uses? > > I read about them ages ago but wonder ... Typically they are used for I/O with the physical world. Some, like the Arduino Nano Sense, have a number of sensors on the board including a 9 axis inertial, temperature, humidity, barometric, microphone, light intensity, and color sensors. MIT chose this for their TinyML course because it was one-stop shopping. Using TinyML, a really cut down version of TensorFlow, gesture, wake word, image recognition, and other tasks were move entirely to the edge device. Others, like the Pico series, bring out the I/O pins but have little onboard. Many pins are multi-purpose and are used for SPI or I2C protocols, PWM, A/D measurements, and plain vanilla digital. The Raspberry Pi series lives in both worlds. Particularly with the new Pi 5, it's usable as a desktop Linux system, if somewhat limited, while bringing out the PIO pins. It's really a different world than a typical laptop. Years (decades?) ago you could subvert the parallel port controller to provide digital I/O but who has seen a parallel port lately? There are many families and devices available that are used for any number of projects that need to interact with the real world. The earliest variants were usually programmed in assembler since 2k of EPROM and 128 bytes of RAM was typical. As they improved C was sued. Now there's enough flash and SRAM to support MicroPython or CircuitPython and they are fast enough for most purposes. There are specialized drivers but if you know Python the bulk of the logic will be very familiar. For example I have a desktop Python app that pulls weather data from NOAA's web API. The Pico W has Wifi, so if I wanted to compare NOAA's temperature, humidity, and barometric pressure to the values I read from a local sensor, the API requests and parsing the JSON reply would be almost identical to the desktop code. Conversely I could use the Pico W as a web server to make its sensor reading available. From bowman at montana.com Sun Aug 25 23:01:18 2024 From: bowman at montana.com (rbowman) Date: 26 Aug 2024 03:01:18 GMT Subject: Triggered By Mediocre Code (Posting On Python-List Prohibited) References: <878qwk9rym.fsf@nightsong.com> Message-ID: On Sun, 25 Aug 2024 23:49:48 -0000 (UTC), Lawrence D'Oliveiro wrote: > The irony of my putdown is that PHP can do it about as simply. But don?t > expect your typical PHP programmers to know that ... It has had amazing longevity for something that was born as Personal Home Page. From norman.robins59 at gmail.com Tue Aug 27 09:48:09 2024 From: norman.robins59 at gmail.com (Norman Robins) Date: Tue, 27 Aug 2024 06:48:09 -0700 Subject: Mocking a function in a process started with multiprocessing.Process In-Reply-To: References: Message-ID: Is it possible to mock out a function in a process started with multiprocessing.Process? AI tells me it is, but I have not gotten it to work. The use case is that I have a server I want to write tests for. I want the tests to start up the server, but I need to mock out the JWT based auth functions in the server. If it is possible, perhaps I am doing something wrong. The function I want to mock out is in foo.bar.baz.validate_jwt`. The server imports it as from .baz import validate_jwt. I have tried to mock it many ways, here is the latest attempt: @pytest.fixture(scope="module") def mock_get_public_key(): return PUBLIC_KEY @patch('foo.bar.baz.validate_jwt') def test_fn(mock_validate_jwt, mock_get_public_key): I also tried `@patch('foo.bar.main.validate_jwt')` But no matter what I tried the real functions get called. Here is an example: In directory foo/bar file baz.py def get_public_key(token: str) -> str: print("in get_public_key) def validate_jwt(token: str) -> dict public_key = get_public_key(token) print("in validate_jwt) In directory foo/bar file main.py: from .baz import validate_jwt def server(token): valid = validate_jwt(token) In my test code, which is in test/test_main.py (test and foo are at the same level) @pytest.fixture(scope="module")def mock_get_public_key(): return PUBLIC_KEY def run_server(port): from foo.bar.main import start start(is_prod=False, port=port) @pytest.fixture(scope="module")def mock_validate_jwt(token): return {"user": "test_user"} @pytest.fixture(scope="module")def start_server(): port = 8002 server_process = multiprocessing.Process(target=run_server, args=(port,)) server_process.start() max_retries = 10 for i in range(max_retries): try: response = requests.get(f"http://127.0.0.1:{port}/echo?message=test") if response.status_code == 200: break except requests.ConnectionError: time.sleep(1) else: pytest.fail("Server did not start in time") @pytest.mark.usefixtures("start_server")@patch('dispatcher.main.validate_jwt')def test_function(mock_validate_jwt, mock_get_public_key): , . . When test_function runs the real validate_jwt runs, not my mock. From piergiorgio.sartor.this.should.not.be.used at nexgo.REMOVETHIS.de Tue Aug 27 13:38:34 2024 From: piergiorgio.sartor.this.should.not.be.used at nexgo.REMOVETHIS.de (Piergiorgio Sartor) Date: Tue, 27 Aug 2024 19:38:34 +0200 Subject: Triggered By Mediocre Code (Posting On Python-List Prohibited) In-Reply-To: References: Message-ID: On 25/08/2024 23.53, Lawrence D'Oliveiro wrote: > Looking at this article about the top three languages for getting > programming jobs > , > naturally I couldn?t help noticing the code in the screenshot at the > top (my transcription): > > bufferedNumber = str(doc.GetTime().GetFrame(docFps)) > if len(bufferedNumber)<4: > for x in range(len(bufferedNumber),4): > bufferedNumber = "0" + bufferedNumber > > I mean, really? Four lines to do what could be done in a single > expression? > > Was that written by a PHP programmer, do you think? That the more correct question would be: What is easier to read? And to debug? The four line version or the one liner? To paraphrase someone: "If the length of a program would be measured by the time needed to understand it, some program would be too short to be short." Because the world is plenty of one liner nobody (almost) doesn't understand. There is even a category in the OCC (https://www.ioccc.org/). Don't get me wrong, I like and dislike one liner. Namely, I like mine and dislike the others :-) bye, -- piergiorgio From grant.b.edwards at gmail.com Tue Aug 27 17:39:21 2024 From: grant.b.edwards at gmail.com (Grant Edwards) Date: Tue, 27 Aug 2024 17:39:21 -0400 (EDT) Subject: Formatting a str as a number References: Message-ID: <4Wtgt14jXFznWHr@mail.python.org> On 2024-08-27, Gilmeh Serda via Python-list wrote: > On 25 Aug 2024 15:46:25 GMT, Stefan Ram wrote: > >> f"{int(number):>20,}" > > Great. Thanks. Do you have a link to where that's documented? > > I did web search, found nothing. https://docs.python.org/3/library/string.html#formatspec https://docs.python.org/3/reference/lexical_analysis.html#f-strings From me at sc1f1dan.com Wed Aug 28 03:41:28 2024 From: me at sc1f1dan.com (Daniel) Date: Wed, 28 Aug 2024 08:41:28 +0100 Subject: new here References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> <3f06d06e-732f-4afa-ba23-24aa1b742de4@DancesWithMice.info> <009a01daf757$663b2ae0$32b180a0$@gmail.com> Message-ID: <87y14hm6vr.fsf@rpi3> rbowman writes: > On Sun, 25 Aug 2024 21:29:30 -0400, avi.e.gross wrote: > >> If everyone will pardon my curiosity, who and what purposes are these >> smaller environments for and do many people use them? >> >> I mean the price of a typical minimal laptop is not a big deal today. So >> are these for some sort of embedded uses? >> >> I read about them ages ago but wonder ... > > Typically they are used for I/O with the physical world. Some, like the > Arduino Nano Sense, have a number of sensors on the board including a 9 > axis inertial, temperature, humidity, barometric, microphone, light > intensity, and color sensors. MIT chose this for their TinyML course > because it was one-stop shopping. Using TinyML, a really cut down version > of TensorFlow, gesture, wake word, image recognition, and other tasks were > move entirely to the edge device. > > Others, like the Pico series, bring out the I/O pins but have little > onboard. Many pins are multi-purpose and are used for SPI or I2C > protocols, PWM, A/D measurements, and plain vanilla digital. > > The Raspberry Pi series lives in both worlds. Particularly with the new Pi > 5, it's usable as a desktop Linux system, if somewhat limited, while > bringing out the PIO pins. > > It's really a different world than a typical laptop. Years (decades?) ago > you could subvert the parallel port controller to provide digital I/O but > who has seen a parallel port lately? > > There are many families and devices available that are used for any number > of projects that need to interact with the real world. The earliest > variants were usually programmed in assembler since 2k of EPROM and 128 > bytes of RAM was typical. As they improved C was sued. Now there's enough > flash and SRAM to support MicroPython or CircuitPython and they are fast > enough for most purposes. There are specialized drivers but if you know > Python the bulk of the logic will be very familiar. > > For example I have a desktop Python app that pulls weather data from > NOAA's web API. The Pico W has Wifi, so if I wanted to compare NOAA's > temperature, humidity, and barometric pressure to the values I read from a > local sensor, the API requests and parsing the JSON reply would be almost > identical to the desktop code. Conversely I could use the Pico W as a web > server to make its sensor reading available. That is so cool. I've had the same idea to use the API with AWS for my bbs. I also want to do the same thing for other government sites like ecfr for pulling aviation regulations. Is your code somewhere I can look at it? Daniel From bowman at montana.com Wed Aug 28 14:06:33 2024 From: bowman at montana.com (rbowman) Date: 28 Aug 2024 18:06:33 GMT Subject: new here References: <87ikvuzv8g.fsf@rpi3> <87zfp4bgm3.fsf@nightsong.com> <6da65aef-86d7-46e7-90cc-692985ffaf29@DancesWithMice.info> <3f06d06e-732f-4afa-ba23-24aa1b742de4@DancesWithMice.info> <009a01daf757$663b2ae0$32b180a0$@gmail.com> <87y14hm6vr.fsf@rpi3> Message-ID: On Wed, 28 Aug 2024 08:41:28 +0100, Daniel wrote: > That is so cool. I've had the same idea to use the API with AWS for my > bbs. I also want to do the same thing for other government sites like > ecfr for pulling aviation regulations. > > Is your code somewhere I can look at it? The NOAA? I didn't get dncy so I'm calling get_station_info with a hardcoded latitude and longitude. The commented out print(json.dumps()) pretty print the JSON so you can decide what to extract. I'm not 100% sure about tacking K onto the grid ID. The famous 'works for me' A URL like https://forecast.weather.gov/MapClick.php?lat=40.8551337&lon=-114.0140115 will show the same info, in this case for Wendover Airport (KENV). https://www.weather.gov/documentation/services-web-api is the documentation for the API. import json import requests def get_station_info(latitude, longitude): url = f"https://api.weather.gov/points/{latitude},{longitude}" response = requests.get(url).json() # print(json.dumps(response, indent=4, sort_keys=True)) property = response['properties'] grid_id = property["gridId"] grid_x = property["gridX"] grid_y = property["gridY"] forecast_url = property["forecast"] observation_url = f"https://api.weather.gov/stations/K{grid_id}/ observations/latest" response = requests.get(observation_url).json() # print(json.dumps(response, indent=4, sort_keys=True)) properties = response['properties'] pressure = properties['barometricPressure'] temperature = properties['temperature'] humidity = properties['relativeHumidity'] dewpoint = properties['dewpoint'] temp = 9 * temperature['value'] / 5 + 32 dew = 9 * dewpoint['value'] / 5 + 32 hum = humidity['value'] bp = pressure['value'] * 0.000295 print(f"temperature {temp} dewpoint {dew:.2f} humidity {hum:.2f} pressure {bp:.2f}\n") response = requests.get(forecast_url).json() properties = response['properties'] periods = properties['periods'] # print(json.dumps(period, indent=4, sort_keys=True)) for i in range(0, len(periods)): period = periods[i] print(period['name']) print(period['detailedForecast']) print(f"temperature: {period['temperature']}") print(f"wind {period['windSpeed']} {period['windDirection']}") print() From me at sc1f1dan.com Wed Aug 28 17:09:56 2024 From: me at sc1f1dan.com (Daniel) Date: Wed, 28 Aug 2024 22:09:56 +0100 Subject: Script stops running with no error Message-ID: <87r0a8xskb.fsf@rpi3> 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. Wiktionary is wikimedia's dictionary. My requirements for v1 Query the api for the definition for table (in the python script). Pull the proper json Parse the json output the definition only What's happening? I run the script and, maybe I don't know shit from shinola, but it appears I composed it properly. I wrote the script to do the above. The wiktionary json file denotes a list with this character # and sublists as ## but numbers them On Wiktionary, the definitions are denoted like: 1. blablabla 1. blablabla 2. blablablablabla 2. balbalbla 3. blablabla 1. blablabla I wrote my script to alter it so that the sublist are letters 1. blablabla a. blablabla b. blablabla 2. blablabla and so on /snip At this point, the script stops after it assesses the first line_counter and sub_counter. The code is below, please tell me which stupid mistake I made (I'm sure it's simple). Am I making a bad approach? Is there an easier method of parsing json than the way I'm doing it? I'm all ears. Be kind, i'm really new at python. Environment is emacs. import requests import re search_url = 'https://api.wikimedia.org/core/v1/wiktionary/en/search/page' search_query = 'table' parameters = {'q': search_query} response = requests.get(search_url, params=parameters) data = response.json() page_id = None if 'pages' in data: for page in data['pages']: title = page.get('title', '').lower() if title == search_query.lower(): page_id = page.get('id') break if page_id: content_url = f'https://api.wikimedia.org/core/v1/wiktionary/en/page/ {search_query}' response = requests.get(content_url) page_data = response.json() if 'source' in page_data: content = page_data['source'] cases = {'noun': r'\{en-noun\}(.*?)(?=\{|\Z)', 'verb': r'\{en-verb\}(.*?)(?=\{|\Z)', 'adjective': r'\{en-adj\}(.*?)(?=\{|\Z)', 'adverb': r'\{en-adv\}(.*?)(?=\{|\Z)', 'preposition': r'\{en-prep\}(.*?)(?=\{|\Z)', 'conjunction': r'\{en-con\}(.*?)(?=\{|\Z)', 'interjection': r'\{en-intj\}(.*?)(?=\{|\Z)', 'determiner': r'\{en-det\}(.*?)(?=\{|\Z)', 'pronoun': r'\{en-pron\}(.*?)(?=\{|\Z)' #make sure there aren't more word types } def clean_definition(text): text = re.sub(r'\[\[(.*?)\]\]', r'\1', text) text = text.lstrip('#').strip() return text print(f"\n*** Definition for {search_query} ***") for word_type, pattern in cases.items(): match = re.search(pattern, content, re.DOTALL) if match: lines = [line.strip() for line in match.group(1).split('\n') if line.strip()] definition = [] main_counter = 0 sub_counter = 'a' for line in lines: if line.startswith('##*') or line.startswith('##:'): continue if line.startswith('# ') or line.startswith('#\t'): main_counter += 1 sub_counter = 'a' cleaned_line = clean_definition(line) definition.append(f"{main_counter}. {cleaned_line}") elif line.startswith('##'): cleaned_line = clean_definition(line) definition.append(f"?? {sub_counter}. {cleaned_line}") sub_counter = chr(ord(sub_counter) + 1) if definition: print(f"\n{word_type.capitalize()}\n") print("\n".join(definition)) break else: print("try again beotch") Thanks, Daniel From list1 at tompassin.net Wed Aug 28 18:32:16 2024 From: list1 at tompassin.net (Thomas Passin) Date: Wed, 28 Aug 2024 18:32:16 -0400 Subject: Script stops running with no error In-Reply-To: <87r0a8xskb.fsf@rpi3> References: <87r0a8xskb.fsf@rpi3> Message-ID: 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. > > Wiktionary is wikimedia's dictionary. > > My requirements for v1 > > Query the api for the definition for table (in the python script). > Pull the proper json > Parse the json > output the definition only > > What's happening? > > I run the script and, maybe I don't know shit from shinola, but it > appears I composed it properly. I wrote the script to do the above. > The wiktionary json file denotes a list with this character # and > sublists as ## but numbers them > > On Wiktionary, the definitions are denoted like: > > 1. blablabla > 1. blablabla > 2. blablablablabla > 2. balbalbla > 3. blablabla > 1. blablabla > > > I wrote my script to alter it so that the sublist are letters > > 1. blablabla > a. blablabla > b. blablabla > 2. blablabla and so on > /snip > > At this point, the script stops after it assesses the first line_counter > and sub_counter. The code is below, please tell me which stupid mistake > I made (I'm sure it's simple). > > Am I making a bad approach? Is there an easier method of parsing json > than the way I'm doing it? I'm all ears. > > Be kind, i'm really new at python. Environment is emacs. > > import requests > import re > > search_url = 'https://api.wikimedia.org/core/v1/wiktionary/en/search/page' > search_query = 'table' > parameters = {'q': search_query} > > response = requests.get(search_url, params=parameters) > data = response.json() > > page_id = None > > if 'pages' in data: > for page in data['pages']: > title = page.get('title', '').lower() > if title == search_query.lower(): > page_id = page.get('id') > break > > if page_id: > content_url = > f'https://api.wikimedia.org/core/v1/wiktionary/en/page/ > {search_query}' > response = requests.get(content_url) > page_data = response.json() > if 'source' in page_data: > content = page_data['source'] > cases = {'noun': r'\{en-noun\}(.*?)(?=\{|\Z)', > 'verb': r'\{en-verb\}(.*?)(?=\{|\Z)', > 'adjective': r'\{en-adj\}(.*?)(?=\{|\Z)', > 'adverb': r'\{en-adv\}(.*?)(?=\{|\Z)', > 'preposition': r'\{en-prep\}(.*?)(?=\{|\Z)', > 'conjunction': r'\{en-con\}(.*?)(?=\{|\Z)', > 'interjection': r'\{en-intj\}(.*?)(?=\{|\Z)', > 'determiner': r'\{en-det\}(.*?)(?=\{|\Z)', > 'pronoun': r'\{en-pron\}(.*?)(?=\{|\Z)' > #make sure there aren't more word types > } > > def clean_definition(text): > text = re.sub(r'\[\[(.*?)\]\]', r'\1', text) > text = text.lstrip('#').strip() > return text > > print(f"\n*** Definition for {search_query} ***") > for word_type, pattern in cases.items(): > match = re.search(pattern, content, re.DOTALL) > if match: > lines = [line.strip() for line in > match.group(1).split('\n') > if line.strip()] > definition = [] > main_counter = 0 > sub_counter = 'a' > > for line in lines: > if line.startswith('##*') or line.startswith('##:'): > continue > > if line.startswith('# ') or line.startswith('#\t'): > main_counter += 1 > sub_counter = 'a' > cleaned_line = clean_definition(line) > definition.append(f"{main_counter}. {cleaned_line}") > elif line.startswith('##'): > cleaned_line = clean_definition(line) > definition.append(f"?? {sub_counter}. {cleaned_line}") > sub_counter = chr(ord(sub_counter) + 1) > > if definition: > print(f"\n{word_type.capitalize()}\n") > print("\n".join(definition)) > break > else: > print("try again beotch") You need to check at each part of the code to see if you are getting or producing what you think you are. You also should create a text constant containing the JSON input you expect to get. Make sure you can process that. Start simple - one main item. Then two main items. Then two main items with one sub item. And so on. I'm not sure what you want to produce in the end but this seems awfully complex to be starting with. Also you aren't taking advantage of the structure inherent in the JSON. If the data response isn't too big, you can probably take it as is and use the Python JSON reader to produce a Python data structure. It should be much easier (and faster) to process the data structure than to repeatedly scan all those lines of data with regexes. From PythonList at DancesWithMice.info Wed Aug 28 20:07:07 2024 From: PythonList at DancesWithMice.info (dn) Date: Thu, 29 Aug 2024 12:07:07 +1200 Subject: Script stops running with no error In-Reply-To: References: <87r0a8xskb.fsf@rpi3> Message-ID: <0fec5175-e2a2-407a-9e09-c6901617b75c@DancesWithMice.info> 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 output, for now, just the >> definition of the word. >> >> Wiktionary is wikimedia's dictionary. >> >> My requirements for v1 >> >> Query the api for the definition for table (in the python script). >> Pull the proper json >> Parse the json >> output the definition only > You need to check at each part of the code to see if you are getting or > producing what you think you are.? You also should create a text > constant containing the JSON input you expect to get.? Make sure you can > process that.? Start simple - one main item.? Then two main items.? Then > two main items with one sub item.? And so on. > > I'm not sure what you want to produce in the end but this seems awfully > complex to be starting with.? Also you aren't taking advantage of the > structure inherent in the JSON.? If the data response isn't too big, you > can probably take it as is and use the Python JSON reader to produce a > Python data structure.? It should be much easier (and faster) to process > the data structure than to repeatedly scan all those lines of data with > regexes. Good effort so far! Further to @Thomas: the code does seem to be taking the long way around! How can we illustrate that, and improve life? The Wiktionary docs at https://developer.wikimedia.org/use-content/ discuss how to use their "Developer Portal". Worth reading! As part of the above, we find the "API:Data formats" page (https://www.mediawiki.org/wiki/API:Data_formats) which offers a simple example (more simple than your objectives): api.php?action=query&titles=Main%20page&format=json which produces: { "query": { "pages": { "217225": { "pageid": 217225, "ns": 0, "title": "Main page" } } } } Does this look like a Python dict[ionary's] output to you? It is, (more discussion at the web.ref) - but it is wrapped into a JSON payload. There are various ways of dealing with JSON-formatted data. You're already using requests. Perhaps leave such research until later. So, as soon as "page_data" is realised from "response", print() it (per above: make sure you're actually seeing what you're expecting to see). Computers have this literal habit of doing what we ask, not what we want! PS the pprint/pretty printer library offers a neater way of outputting a "nested" data-structure (https://docs.python.org/3/library/pprint.html). Thereafter, make as much use of the returned dict/list structure as can. At each stage of the 'drilling-down' process, again, print() it (to make sure ...) In this way the code will step-through the various 'layers' of data-organisation. That observation and stepping-through of 'layers' is a hint that the code should (probably) also be organised by 'layer'! For example, the first for-loop finds a page which matches the search-key. This could be abstracted into a (well-named) function. Thus, you can write a test-harness which provides the function with some sample input (which you know from earlier print-outs!) and can ensure (with yet another print()) that the returned-result is as-expected! NB the test-data and check-print() should be outside the function. Please take these steps as-read or as 'rules'. Once your skills expand, you will likely become ready to learn about unit-testing, pytest, etc. At which time, such ideas will 'fall into place'. BTW/whilst that 'unit' is in-focus: how many times will the current code compute search_query.lower()? How many times (per function call) will "search_query" be any different from previous calls? So, should that computation be elsewhere? (won't make much difference to execution time, but a coding-skill: consider whether to leave computation until the result is actually needed (lazy-evaluation), or if early-computation will save unnecessary repeated-computation) Similarly, 'lift' constants such as "cases" out of (what will become) functions and put them towards the top of the script. This means that all such 'definition' and 'configuration' settings will be found together in one easy-to-find location AND makes the functional code easier to read. Now, back to the question: where is the problem arising? Do you know or do you only know that what comes-out at the end is unattractive/unacceptable? The idea of splitting the code into functions (or "units") is not only that you could test each and thereby narrow-down the location of the problem (and so that we don't have to read so much code in a bid to help) but that when you 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 From bowman at montana.com Wed Aug 28 21:33:33 2024 From: bowman at montana.com (rbowman) Date: 29 Aug 2024 01:33:33 GMT Subject: Script stops running with no error References: <87r0a8xskb.fsf@rpi3> Message-ID: On Wed, 28 Aug 2024 22:09:56 +0100, Daniel wrote: > if definition: > print(f"\n{word_type.capitalize()}\n") > print("\n".join(definition)) > break I don't know if that was intended but the 'break' kicks you out of for word_type, pattern in cases.items(): I added a little debugging to show the cases iteration and commented out the break. 'noun' has five lines and appears to be correct. 'verb' has two lines, neither of which match the if/else. The others aren't in the return from https://api.wikimedia.org/core/v1/wiktionary/en/page/table. I have to admit I sometimes miss C where I can bounce between curlies. Output: python wiki.py *** Definition for table *** word_type noun pattern: \{en-noun\}(.*?)(?=\{|\Z) line } line # Furniture with a top surface to accommodate a variety of uses. line ## An item of [[furniture]] with a [[flat]] [[top]] [[surface]] raised above the ground, usually on one or more legs. line ##: ''Set that dish on the '''table''' over there, please.'' line ##* Noun 1. Furniture with a top surface to accommodate a variety of uses. ?? a. An item of furniture with a flat top surface raised above the ground, usually on one or more legs. word_type verb pattern: \{en-verb\}(.*?)(?=\{|\Z) line } line # word_type adjective pattern: \{en-adj\}(.*?)(?=\{|\Z) word_type adverb pattern: \{en-adv\}(.*?)(?=\{|\Z) word_type preposition pattern: \{en-prep\}(.*?)(?=\{|\Z) word_type conjunction pattern: \{en-con\}(.*?)(?=\{|\Z) word_type interjection pattern: \{en-intj\}(.*?)(?=\{|\Z) word_type determiner pattern: \{en-det\}(.*?)(?=\{|\Z) word_type pronoun pattern: \{en-pron\}(.*?)(?=\{|\Z) From list1 at tompassin.net Wed Aug 28 22:58:02 2024 From: list1 at tompassin.net (Thomas Passin) Date: Wed, 28 Aug 2024 22:58:02 -0400 Subject: Script stops running with no error In-Reply-To: <0fec5175-e2a2-407a-9e09-c6901617b75c@DancesWithMice.info> References: <87r0a8xskb.fsf@rpi3> <0fec5175-e2a2-407a-9e09-c6901617b75c@DancesWithMice.info> Message-ID: <0a5b67d8-ba6f-4a15-b9e6-a9905e5a987e@tompassin.net> 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 data from >>> wiktionary.org. I want to parse the json and output, for now, just the >>> definition of the word. >>> >>> Wiktionary is wikimedia's dictionary. >>> >>> My requirements for v1 >>> >>> Query the api for the definition for table (in the python script). >>> Pull the proper json >>> Parse the json >>> output the definition only > > >> You need to check at each part of the code to see if you are getting >> or producing what you think you are.? You also should create a text >> constant containing the JSON input you expect to get.? Make sure you >> can process that.? Start simple - one main item.? Then two main >> items.? Then two main items with one sub item.? And so on. >> >> I'm not sure what you want to produce in the end but this seems >> awfully complex to be starting with.? Also you aren't taking advantage >> of the structure inherent in the JSON.? If the data response isn't too >> big, you can probably take it as is and use the Python JSON reader to >> produce a Python data structure.? It should be much easier (and >> faster) to process the data structure than to repeatedly scan all >> those lines of data with regexes. > > > Good effort so far! > > > Further to @Thomas: the code does seem to be taking the long way around! > How can we illustrate that, and improve life? > > > The Wiktionary docs at https://developer.wikimedia.org/use-content/ > discuss how to use their "Developer Portal". Worth reading! > > As part of the above, we find the "API:Data formats" page (https:// > www.mediawiki.org/wiki/API:Data_formats) which offers a simple example > (more simple than your objectives): > > api.php?action=query&titles=Main%20page&format=json > > which produces: > > { > ? "query": { > ??? "pages": { > ????? "217225": { > ??????? "pageid": 217225, > ??????? "ns": 0, > ??????? "title": "Main page" > ????? } > ??? } > ? } > } > > Does this look like a Python dict[ionary's] output to you? > > It is, (more discussion at the web.ref) > - but it is wrapped into a JSON payload. To give more detail: import json from pprint import pprint DATA = """{ "query": { "pages": { "217225": { "pageid": 217225, "ns": 0, "title": "Main page" } } } }""" data_dict = json.loads(DATA) pprint(data_dict) Easy. If you have a really big file it can be fearfully slow so it may or may not be a good approach for this problem. Or you could parse out the data with JSONpath (which I have never used but it's the right kind of approach): https://pypi.org/project/jsonpath-ng/ Another possibility: JMESPath: https://python.land/data-processing/working-with-json/jmespath These kind of approaches also handle the parsing for you and help in constructing queries. > There are various ways of dealing with JSON-formatted data. You're > already using requests. Perhaps leave such research until later. > > > So, as soon as "page_data" is realised from "response", print() it (per > above: make sure you're actually seeing what you're expecting to see). > Computers have this literal habit of doing what we ask, not what we want! > > PS the pprint/pretty printer library offers a neater way of outputting a > "nested" data-structure (https://docs.python.org/3/library/pprint.html). > > > Thereafter, make as much use of the returned dict/list structure as can. > At each stage of the 'drilling-down' process, again, print() it (to make > sure ...) > > > In this way the code will step-through the various 'layers' of data- > organisation. That observation and stepping-through of 'layers' is a > hint that the code should (probably) also be organised by 'layer'! For > example, the first for-loop finds a page which matches the search-key. > This could be abstracted into a (well-named) function. > > Thus, you can write a test-harness which provides the function with some > sample input (which you know from earlier print-outs!) and can ensure > (with yet another print()) that the returned-result is as-expected! > > NB the test-data and check-print() should be outside the function. > Please take these steps as-read or as 'rules'. Once your skills expand, > you will likely become ready to learn about unit-testing, pytest, etc. > At which time, such ideas will 'fall into place'. > > > BTW/whilst that 'unit' is in-focus: how many times will the current code > compute search_query.lower()? How many times (per function call) will > "search_query" be any different from previous calls? So, should that > computation be elsewhere? > (won't make much difference to execution time, but a coding-skill: > consider whether to leave computation until the result is actually > needed (lazy-evaluation), or if early-computation will save unnecessary > repeated-computation) > > > Similarly, 'lift' constants such as "cases" out of (what will become) > functions and put them towards the top of the script. This means that > all such 'definition' and 'configuration' settings will be found > together in one easy-to-find location AND makes the functional code > easier to read. > > > Now, back to the question: where is the problem arising? Do you know or > do you only know that what comes-out at the end is unattractive/ > unacceptable? > > The idea of splitting the code into functions (or "units") is not only > that you could test each and thereby narrow-down the location of the > problem (and so that we don't have to read so much code in a bid to > help) but that when you 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? > From simon.n.connah at protonmail.com Fri Aug 30 15:18:29 2024 From: simon.n.connah at protonmail.com (Simon Connah) Date: Fri, 30 Aug 2024 19:18:29 +0000 Subject: Sanitise user input for a script Message-ID: 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 sanitise SQL to protect against SQL injections. I could do it either on the website itself or by doing it on the host machine. I'm thinking of using argparse but I'm aware it does not offer any protection itself. If someone has any suggestions I'd appreciated it. If you need more information then please let me know. Simon. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 249 bytes Desc: OpenPGP digital signature URL: From hjp-python at hjp.at Fri Aug 30 16:23:01 2024 From: hjp-python at hjp.at (Peter J. Holzer) Date: Fri, 30 Aug 2024 22:23:01 +0200 Subject: Sanitise user input for a script In-Reply-To: References: Message-ID: <20240830202301.mb2coheew2yb46v4@hjp.at> On 2024-08-30 19:18:29 +0000, 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 sanitise SQL to protect against SQL > injections. (Aside: Don't "sanitize" SQL. Use placeholders.) > I could do it either on the website itself or by doing it on the host > machine. You will have to do it in the web site. The SSH manual states: | If supplied, the arguments will be appended to the command, separated by | spaces, before it is sent to the server to be executed. So whether you call ssh myhost print_args a b c or ssh myhost print_args a "b c" in both cases exactly the same string will be sent to myhost, and it won't have any chance to distinguish them. So you will either have to filter ("sanitize") the arguments or properly quote them before invoking SSH. > If someone has any suggestions I'd appreciated it. If you need more > information then please let me know. First, if there is any chance that your arguments can contain characters with meaning to the shell (like an apostrophe in a name), get the quoting correct. If you can, transmit those arguments in a different way (e.g. as input, maybe just nul-separated, may as JSON, or whatever). That removes the SSH-specific problems. There may still be problems with the python script on the host. Then, do all the validation you can on the web server. Reject all requests which aren't valid. But be sure to check against the relevant specifications, not your prejudices (You may not think that an apostrophe in an email address is valid, but it is). Include meaningful error messages (not just "input invalid"). Helping your legitimate users is more important than slightly inconveniencing an attacker. hp -- _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp at hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From PythonList at DancesWithMice.info Fri Aug 30 18:28:19 2024 From: PythonList at DancesWithMice.info (dn) Date: Sat, 31 Aug 2024 10:28:19 +1200 Subject: ListAdmin: Is list/archive working correctly? Message-ID: 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 two contributions quoted, but no such original-message has appeared in the thread. The archive is only showing seven contributions (for some reason Grant's recent contribution under the different subject line: "Formatting a str as a number" appears separately, even though it threads as the same conversation in email) None of the OP's contributions appear! IIRC the design has been that it doesn't matter if a contribution comes from the Newsgroup or the email Discussion List, they are treated the same. Are Newsgroup contributions being archived (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 From list1 at tompassin.net Fri Aug 30 18:35:59 2024 From: list1 at tompassin.net (Thomas Passin) Date: Fri, 30 Aug 2024 18:35:59 -0400 Subject: Sanitise user input for a script In-Reply-To: References: Message-ID: <69cb2985-3284-426d-a8b0-af256a3ac2ff@tompassin.net> 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 sanitise SQL to protect against SQL injections. You should never, never, never "sanitize" SQL. Use prepared statements instead. What kind of user input do you expect to get that would need to be "sanitized"? How are you going to use it such that malicious input might cause trouble? I hope you aren't planning to exec() it. Are you expecting a user to send in a script and your server will execute it? Better read up on sandboxing, then. If you won't be exec()ing a script, then you can consider creating an API where each method of the API can only do limited things, and only with certain parameters not all of all them. The SSH message can include the name of the method to use. And follow what Peter Holzer wrote. Don't forget that quoting practices are not the same between Windows and Linux. > I could do it either on the website itself or by doing it on the host machine. > > I'm thinking of using argparse but I'm aware it does not offer any protection itself. > > If someone has any suggestions I'd appreciated it. If you need more information then please let me know. > > Simon. > > From simon.n.connah at protonmail.com Sat Aug 31 00:49:15 2024 From: simon.n.connah at protonmail.com (Simon Connah) Date: Sat, 31 Aug 2024 04:49:15 +0000 Subject: Sanitise user input for a script In-Reply-To: <69cb2985-3284-426d-a8b0-af256a3ac2ff@tompassin.net> References: <69cb2985-3284-426d-a8b0-af256a3ac2ff@tompassin.net> Message-ID: On Friday, 30 August 2024 at 23:35, Thomas Passin via Python-list wrote: > > > 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 sanitise SQL to protect against SQL injections. > > > You should never, never, never "sanitize" SQL. Use prepared statements > instead. Yes. Sorry. I forgot what it was called and accidentally called it sanitising instead but I'm using prepared statements in psycopg 3 for SQL. > > What kind of user input do you expect to get that would need to be > "sanitized"? How are you going to use it such that malicious input might > cause trouble? I hope you aren't planning to exec() it. Are you > expecting a user to send in a script and your server will execute it? > Better read up on sandboxing, then. No. I'm not planning on exec() a random script. I have a prepared Python script which configures various things. The web server connects to the server via SSH and runs my Python script which then runs commands like bhyve (FreeBSD) and it also does things like configure the firewall config file to change firewall rules. The customer has no direct access to the Python script. In terms of arguments the script that deals with bhyve for instance takes arguments such as CPU count and RAM amount. > > If you won't be exec()ing a script, then you can consider creating an > API where each method of the API can only do limited things, and only > with certain parameters not all of all them. The SSH message can include > the name of the method to use. > > And follow what Peter Holzer wrote. Don't forget that quoting practices > are not the same between Windows and Linux. Thank you. I'll look into this. Makes sense. > > > I could do it either on the website itself or by doing it on the host machine. > > > > I'm thinking of using argparse but I'm aware it does not offer any protection itself. > > > > If someone has any suggestions I'd appreciated it. If you need more information then please let me know. > > > > Simon. > > > -- > https://mail.python.org/mailman/listinfo/python-list -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 249 bytes Desc: OpenPGP digital signature URL: From simon.n.connah at protonmail.com Sat Aug 31 00:51:42 2024 From: simon.n.connah at protonmail.com (Simon Connah) Date: Sat, 31 Aug 2024 04:51:42 +0000 Subject: Sanitise user input for a script In-Reply-To: <20240830202301.mb2coheew2yb46v4@hjp.at> References: <20240830202301.mb2coheew2yb46v4@hjp.at> Message-ID: On Friday, 30 August 2024 at 21:23, Peter J. Holzer via Python-list wrote: > > > On 2024-08-30 19:18:29 +0000, 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 sanitise SQL to protect against SQL > > injections. > > > (Aside: Don't "sanitize" SQL. Use placeholders.) > > > I could do it either on the website itself or by doing it on the host > > machine. > > > You will have to do it in the web site. > > The SSH manual states: > > | If supplied, the arguments will be appended to the command, separated by > | spaces, before it is sent to the server to be executed. > > So whether you call > ssh myhost print_args a b c > or > ssh myhost print_args a "b c" > in both cases exactly the same string will be sent to myhost, and it > won't have any chance to distinguish them. > > So you will either have to filter ("sanitize") the arguments or properly > quote them before invoking SSH. > > > If someone has any suggestions I'd appreciated it. If you need more > > information then please let me know. > > > First, if there is any chance that your arguments can contain characters > with meaning to the shell (like an apostrophe in a name), get the > quoting correct. If you can, transmit those arguments in a different way > (e.g. as input, maybe just nul-separated, may as JSON, or whatever). > > That removes the SSH-specific problems. There may still be problems with > the python script on the host. > > Then, do all the validation you can on the web server. Reject all > requests which aren't valid. But be sure to check against the relevant > specifications, not your prejudices (You may not think that an > apostrophe in an email address is valid, but it is). Include meaningful > error messages (not just "input invalid"). Helping your legitimate users > is more important than slightly inconveniencing an attacker. > Thank you very much. That is very useful. Simon. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 249 bytes Desc: OpenPGP digital signature URL: From barry at barrys-emacs.org Sat Aug 31 04:09:26 2024 From: barry at barrys-emacs.org (Barry Scott) Date: Sat, 31 Aug 2024 09:09:26 +0100 Subject: ListAdmin: Is list/archive working correctly? In-Reply-To: References: Message-ID: <7AEE7687-5D1F-415C-8C97-176746F77FC2@barrys-emacs.org> > On 30 Aug 2024, at 23:28, dn via Python-list wrote: > > 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 two contributions quoted, but no such original-message has appeared in the thread. I see 11 messages and none from Stefan. Maybe replies to off list emails? Barry From sjeik_appie at hotmail.com Sat Aug 31 06:51:58 2024 From: sjeik_appie at hotmail.com (Albert-Jan Roskam) Date: Sat, 31 Aug 2024 12:51:58 +0200 Subject: ListAdmin: Is list/archive working correctly? In-Reply-To: Message-ID: I also think that list/archive isn't working properly. Very little emails. Before, this was quite a busy list. From ethan at stoneleaf.us Sat Aug 31 13:41:59 2024 From: ethan at stoneleaf.us (Ethan Furman) Date: Sat, 31 Aug 2024 10:41:59 -0700 Subject: ListAdmin: Is list/archive working correctly? In-Reply-To: References: Message-ID: On 8/30/24 15:28, dn via Python-list wrote: > The OP was @Gilmeh Serda (from an invalid email address). That appears in the email thread > > @Stefan Ram has had two contributions quoted, but no such original-message has appeared in the thread. I can't speak about the archives, but I can say that Stefan's posts are discarded automatically since they are opposed to their words showing up on the list. -- ~Ethan~ Moderator From python at mrabarnett.plus.com Sat Aug 31 14:55:39 2024 From: python at mrabarnett.plus.com (MRAB) Date: Sat, 31 Aug 2024 19:55:39 +0100 Subject: Formatting a str as a number - Okay, one more related thing... In-Reply-To: References: <4Wtgt14jXFznWHr@mail.python.org> Message-ID: <9e13c5d9-fda3-4d7d-a87b-3dfd1c51f6ed@mrabarnett.plus.com> 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 that matter? > > Any ideas? > > Of course I can do f"{123456:>20_}".replace("_", " "), just thought there > might be something else my search mojo fails on. > The format is described here: https://docs.python.org/3/library/string.html#formatspec A space is counted as a fill character. From Keith.S.Thompson+u at gmail.com Sat Aug 31 17:18:44 2024 From: Keith.S.Thompson+u at gmail.com (Keith Thompson) Date: Sat, 31 Aug 2024 14:18:44 -0700 Subject: ListAdmin: Is list/archive working correctly? References: Message-ID: <87h6b04ci3.fsf@nosuchdomain.example.com> Ethan Furman writes: > On 8/30/24 15:28, dn via Python-list wrote: >> The OP was @Gilmeh Serda (from an invalid email address). That appears in the email thread >> >> @Stefan Ram has had two contributions quoted, but no such original-message has appeared in the thread. > > I can't speak about the archives, but I can say that Stefan's posts > are discarded automatically since they are opposed to their words > showing up on the list. I'm posting this on the comp.lang.python Usenet newsgroup. Stefan Ram's posts to comp.lang.python include several header lines, including "X-No-Archive: Yes". I presume the software that copies comp.lang.python posts to python-list pays attention to some of those header lines. (I personally think it's silly to impose this kind of restriction. The Usenet group and the mailing list are both public.) Lawrence D'Oliveiro adds the string "(Posting On Python-List Prohibited)" to the subject on his articles, for reasons he has declined to discuss. I don't know whether the software recognizes that. Can someone who manages the list software discuss the exact rules? I suggest that those rules should be documented on . -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u at gmail.com void Void(void) { Void(); } /* The recursive call of the void */