Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Barry via Python-list
> On 7 Jun 2023, at 16:39, Florian Guilbault via Python-list > wrote: > > Dear Python Technical Team, > > I hope this email finds you well. I am reaching out to you today to seek > assistance with an issue I am facing regarding the installation of 'pip' > despite my numerous attempts to reso

Re: Should NoneType be iterable?

2023-06-20 Thread Barry via Python-list
> On 20 Jun 2023, at 01:57, Greg Ewing via Python-list > wrote: > > I would question the wisdom of designing an API that > can return either a sequence or None. I have some APIs that do return None or a list. The None says that a list is not available and that the caller is responsible with

Re: Canonical list of Python security vulnerabilities

2023-07-14 Thread Barry via Python-list
> On 14 Jul 2023, at 19:14, Bob Kline via Python-list > wrote: > > Can someone point me to the official catalog of security vulnerabilities in > Python (by which I mean cpython and the standard libraries)? I found > https://www.cvedetails.com/vulnerability-list/vendor_id-10210/product_id-1823

Re: Where is the error?

2023-08-07 Thread Barry via Python-list
> On 7 Aug 2023, at 05:28, Cameron Simpson via Python-list > wrote: > > Used to use a Pascal compiler once which was uncannily good at suggesting > where you'd missing a semicolon. Was that on DEC VMS? It was a goal at DEC for its compilers to do this well. They could output the errors in a

Re: GNU gettext: Print string translated and untranslated at the same time

2023-08-18 Thread Barry via Python-list
> On 17 Aug 2023, at 15:01, c.buhtz--- via Python-list > wrote: > > I want to display one string in its original source (untranslated) version > and in its translated version site by site without duplicating the string in > the python source code? > It wouldn't be a big deal if it is only on

Re: Finding good documentation for gpiod

2023-09-03 Thread Barry via Python-list
E > On 3 Sep 2023, at 22:49, Chris Green via Python-list > wrote: > > Mostly I am managing to get things to work as I want but better > documentation of gpiod would be a great help. Ask the author? https://github.com/aswild/python-gpiod Maybe read the source code for hints? Barry -- https:/

Re: `time.perf_counter_ns` always a 64-bit int?

2023-09-16 Thread Barry via Python-list
> On 15 Sep 2023, at 23:00, rmlibre--- via Python-list > wrote: > > I'd like to capture the output of `time.perf_counter_ns()` as an 8-byte > timestamp. > > I'm aware that the docs provide an undefined start value for that clock. > I'm going to assume that means it can't be expected to fit w

Re: venv --upgrade 3.12.0rc2 --> 3.12.0rc3 failure

2023-09-28 Thread Barry via Python-list
> On 27 Sep 2023, at 12:50, Robin Becker via Python-list > wrote: > > Attempting venv upgrade 3.12.0rc2 --> 3.12.0rc3 I find pyvenv.cfg changes, > but the virtual python doesn't. > I guess this ought to be a bug. You must delete and then recreate the venv if the version of python changes.

Re: type annotation vs working code

2023-10-01 Thread Barry via Python-list
> On 1 Oct 2023, at 19:36, Richard Damon via Python-list > wrote: > > Perhaps a better method would be rather than just using the name and catching > the exception, use a real already_initialized flag (set to True when you > initialize), and look it up with getattr() with a default value of

Re: How to write list of integers to file with struct.pack_into?

2023-10-02 Thread Barry via Python-list
On 2 Oct 2023, at 16:02, Jen Kris via Python-list wrote: Iwant to write a list of 64-bit integers to a binary file.  Everyexample I have seen in my research convertsit to .txt, but I want it in binary.  I wrote this code,based on some earlier work I have done: buf= b

Re: Question(s)

2023-10-24 Thread Barry via Python-list
> On 24 Oct 2023, at 18:25, o1bigtenor via Python-list > wrote: > > Is there a way to verify that a program is going to do what it is > supposed to do In the general case not proven to be not possible. Have a read about the halting problem https://en.wikipedia.org/wiki/Halting_problem It i

Re: xor operator

2023-11-13 Thread Barry via Python-list
> On 13 Nov 2023, at 15:16, Dom Grigonis via Python-list > wrote: > > I think it could be useful to have `xor` builtin, which has API similar to > the one of `any` and `all`. I do not understand how xor(iterator) works. I thought xor takes exactly 2 args. I also do not understand how xor c

Re: No current way to just compile flet code into truly native packages for smart phones, etc.?

2023-11-13 Thread Barry via Python-list
> On 13 Nov 2023, at 17:21, Jacob Kruger via Python-list > wrote: > > Had a look at the following bit of introduction to using python and flet to > build cross-platform flutter-based apps using same python code, and, while it > seems to work alright if tell it to run as under GUI here on wi

Re: xor operator

2023-11-13 Thread Barry via Python-list
> On 13 Nov 2023, at 17:48, Dom Grigonis wrote: > > Short circuiting happens, when: > xor([True, True, False, False], n=1) > At index 1 it is clear that the answer is false. Can you share an example with 4 values that is true? And explain why it is xor. Barry -- https://mail.python.org/mai

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Barry via Python-list
> On 22 Dec 2023, at 12:39, Sibylle Koczian via Python-list > wrote: > > Hello, > > I always install Python on Windows in the same manner: > > - Python is not on the path, > - it is installed for all users, > - the Python Launcher is installed for all users, > - the file types .py, .pyw etc

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Barry via Python-list
> On 22 Dec 2023, at 14:29, Sibylle Koczian wrote: > > #!/usr/bin/env/python That was what i thought you had and it will not work. The BOM suggestion is worth trying. Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Barry via Python-list
> On 22 Dec 2023, at 14:58, Christian Buhtz via Python-list > wrote: > > On Windows 11 it usually is the "Terminal" which is different from cmd.exe. In terminal app you can run cmd.exe or powershell, so it is basically the same. Barry -- https://mail.python.org/mailman/listinfo/python-li

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Barry via Python-list
> On 23 Dec 2023, at 00:15, Thomas Passin via Python-list > wrote: > > In neither case is the shebang line used. As i understand it, not in front of my windows box to check. The handler for .py file extension is set to be the py.exe It is py.exe that understands shebang lines. Barry -- h

Re: What is Install-Paths-To in WHEEL file?

2023-12-24 Thread Barry via Python-list
> On 24 Dec 2023, at 00:58, Left Right via Python-list > wrote: > > I'm trying to understand the contents of Wheel files There are lots of packaging experts that hang out on https://discuss.python.org/ you are likely to get a response there if not here replies. Barry -- https://mail.pyt

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-24 Thread Barry via Python-list
> On 24 Dec 2023, at 00:54, rbowman via Python-list > wrote: > > Does that work with virtualenv or conda? I'm slowly getting up to speed > with those. Conda is its own thing, not need for py.exe. Once you have created the venv you do not need py.exe as you will have pythob.exe in the venv

Re: mypy question

2023-12-30 Thread Barry via Python-list
> On 30 Dec 2023, at 15:11, Karsten Hilbert via Python-list > wrote: > > queries = [{'SQL': 'SELECT %(value)s', 'args': {'value': 1}}] > > and > > run_queries(conn, queries:list[str|dict[str, Any]]): In cases like this I often use a wrapper class in place of a simple str. If you have a cla

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-01 Thread Barry via Python-list
> On 1 Jan 2024, at 11:14, Sibylle Koczian via Python-list > wrote: > > But in all this thread I didn't see a single explanation for my current > situation: one and the same shebang line works on Windows 10 / Python 3.11 > and doesn't work on Windows 11 / Python 3.12. I suspect Windows, bec

Re: Question about garbage collection

2024-01-16 Thread Barry via Python-list
> On 16 Jan 2024, at 03:49, Thomas Passin via Python-list > wrote: > > This kind of thing can happen with PyQt, also. There are ways to minimize it > but I don't know if you can ever be sure all Qt C++ objects will get deleted. > It depends on the type of object and the circumstances. Whe

Re: Question about garbage collection

2024-01-16 Thread Barry via Python-list
> On 16 Jan 2024, at 13:17, Thomas Passin via Python-list > wrote: > > The usual advice is to call deleteLater() on objects derived from PyQt > classes. I don't know enough about PyQt to know if this takes care of all > dangling reference problems, though. It works well and robustly. Bar

Re: Question about garbage collection

2024-01-16 Thread Barry via Python-list
> On 16 Jan 2024, at 12:10, Frank Millman via Python-list > wrote: > > My problem is that my app is quite complex, and it is easy to leave a > reference dangling somewhere which prevents an object from being gc'd. What I do to track these problems down is use gc.get_objects() then summerize

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2024-01-16 Thread Barry via Python-list
> On 16 Jan 2024, at 17:11, Sibylle Koczian via Python-list > wrote: > > while the new Windows 11 machine finds the Microsoft stub You can turn off the stub in windows settings. The magic windows jargon is “App Execution Aliases”. Once you find it in settings you can turn off the python and p

Re: Problem resizing a window and button placement

2024-02-24 Thread Barry via Python-list
> On 24 Feb 2024, at 04:36, Steve GS via Python-list > wrote: > > How do I extract the values > from args? You can look up the args in documentation. You can run the example code MRAB provided and see what is printed to learn what is in the args. Barry -- https://mail.python.org/mailman

Re: pathlib.Path.is_file vs os.path.isfile difference

2024-03-10 Thread Barry via Python-list
> On 8 Mar 2024, at 23:19, Thomas Passin via Python-list > wrote: > > We just learned a few posts back that it might be specific to Linux; I ran it > on Windows. Depending on the exact win32 api used there is a 257 limit on windows. The 257 includes 2 for the device, C:, and 255 for the pat

Re: pathlib.Path.is_file vs os.path.isfile difference

2024-03-10 Thread Barry via Python-list
> On 10 Mar 2024, at 14:49, Thomas Passin via Python-list > wrote: > > That and there's a registry setting: > > https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation > Yep that and rules about size of parts of the path. Barry -- https://mail.python.org/mailm

Re: Configuring an object via a dictionary

2024-03-16 Thread Barry via Python-list
> On 15 Mar 2024, at 19:51, Thomas Passin via Python-list > wrote: > > I've always like writing using the "or" form and have never gotten bit I, on the other hand, had to fix a production problem that using “or” introducted. I avoid this idiom because it fails on falsy values. Barry -- htt

Re: the name ``wheel''

2024-03-22 Thread Barry via Python-list
 > On 22 Mar 2024, at 15:25, Gilmeh Serda via Python-list > wrote: > >> Many if not most Linux distributions do not include pip by default. > > Really? It came with Manjaro. Debian and Ubuntu require you to install pip as a separate package. Also puts venv in its own package. Fedora leaves

Re: the name ``wheel''

2024-03-24 Thread Barry via Python-list
> On 22 Mar 2024, at 20:28, Mats Wichmann via Python-list > wrote: > > pip is still a separate package in the .rpm world. which makes sense on a > couple of levels: Yes it’s a separate package, but it’s always installed. At least on Fedora. I agree it makes sense to package it separately, wh

Re: ANN: EmPy 4.1 -- a powerful, robust and mature templating system for Python

2024-03-25 Thread Barry via Python-list
You should considered also announcing on https://discuss.python.org/ which is a lot more active then this list. Barry > On 25 Mar 2024, at 04:13, Erik Max Francis via Python-list > wrote: > > I'm pleased to announce the release of EmPy 4.1. > > The 4._x_ series is a modernization of the so

Re: Making 'compiled' modules work with multiple python versions on Linux

2024-03-29 Thread Barry via Python-list
> On 28 Mar 2024, at 16:13, Olivier B. via Python-list > wrote: > > But on Linux, it seems that linking to libpython3.so instead of > libpython3.11.so.1.0 does not have the same effect, and results in > many unresolved python symbols at link time > > Is this functionality only available on W

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-03-31 Thread Barry via Python-list
> On 31 Mar 2024, at 13:24, Jacob Kruger via Python-list > wrote: > > pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found > and is required by the application I think I have seen this error being discussed before… A web search for pyinstaller and that error leads t

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-04-02 Thread Barry via Python-list
> On 1 Apr 2024, at 15:52, Jacob Kruger via Python-list > wrote: > > Found many, many mentions of errors, with some of the same keywords, but, no > resolutions that match my exact issue at all. Try asking the pyinstaller developers. I think there is a mailing list. Barry > > > As in, mos

Re: Making 'compiled' modules work with multiple python versions on Linux

2024-04-02 Thread Barry via Python-list
> On 1 Apr 2024, at 18:14, Left Right via Python-list > wrote: > > It sounds weird that symbols from Limited API are _missing_ (I'd > expect them to be there no matter what library version you link with). You have to specify the version of the limited API that you want to use. Each release ad

Re: Issues with uninstalling python versions on windows server

2024-05-03 Thread Barry via Python-list
> On 3 May 2024, at 17:43, Tripura Seersha via Python-list > wrote: > > Hi Team, > > I am working on an automation related to uninstalling and installing python > versions on different windows servers. > > I have observed that uninstallation is working only with the account/login > using

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

2024-05-19 Thread Barry via Python-list
> On 18 May 2024, at 16:27, Peter J. Holzer via Python-list > wrote: > > I don't think Linux users have to deal with venvs Modern debian (ubuntu) and fedora block users installing using pip. You must use a venv to pip install packages from pypi now. This is implemented in python and pip and e

Re: Best (simplest) way to share data between processes

2024-07-07 Thread Barry via Python-list
> On 7 Jul 2024, at 22:13, Chris Green via Python-list > wrote: > > a simple file lock can then > be used to prevent simultaneous access (well, simultaneous access when > the writing process is writing). There is a simple pattern to make this robust. Write new values to a tmp file. Close th

Re: Crash when launching python

2024-09-05 Thread Barry via Python-list
> On 5 Sep 2024, at 02:32, Greg Ewing via Python-list > wrote: > > Normally it's in the .app/Contents/MacOS subdirectory. The name > varies, but there's usually just one executable file in there. Run that > from a shell and you should see anything written to stdout or stderr. I recall that d

Re: dis.get_instructions not showing CACHE instructions

2024-10-10 Thread Barry via Python-list
> On 10 Oct 2024, at 14:18, stopa via Python-list > wrote: > > Hello, > I noticed the change in dis module, no longer requiring show_caches to be > set to True to show cache instructions. However I am not able to display > them with get_instructions. > Is there by any chance some bug preventi

Re: shutil.rmtree() fails when used in Fedora (rpm) "mock" environment

2024-10-24 Thread Barry via Python-list
> On 24 Oct 2024, at 15:07, Christian Buhtz via Python-list > wrote: > > On one hand Fedora seems to use a tool called "mock" to build packages in a > chroot environment. > On the other hand the test suite of "Back In Time" does read and write to the > real file system. I am a Fedora packa

Re: Printing UTF-8 mail to terminal

2024-11-01 Thread Barry via Python-list
> On 31 Oct 2024, at 16:42, Left Right via Python-list > wrote: > > MS Windows doesn't have or use > terminals (that's more of a Unix-related concept). Windows does now. They implemented this feature over the last few years. Indeed they took inspiration from how linux does this. You might f

Re: Printing UTF-8 mail to terminal

2024-11-02 Thread Barry via Python-list
> On 1 Nov 2024, at 22:57, Left Right wrote: > > Does this Windows Terminal support the use > of programs like tmux? I have not tried, but should work. Best to install the terminal app from the MS app store. Most use I make is to ssh into linux systems and stuff like editors. Colour output a

Re: shutil.rmtree() fails when used in Fedora (rpm) "mock" environment

2024-10-27 Thread Barry via Python-list
> On 26 Oct 2024, at 12:11, Christian Buhtz via Python-list > wrote: > > As you can see in the linked issue it seems it was an incompatibility > between the version of Python and PyFakeFS. > > In the end it was a Fedora packaging bug because that pyfakefs version > was not compatible with Py

Re: Common objects for CLI commands with Typer

2024-09-20 Thread Barry via Python-list
> On 20 Sep 2024, at 21:01, Loris Bennett via Python-list > wrote: > > Hi, > > Apologies if the following description is to brief - I can expand if no > one knows what I'm on about, but maybe a short description is enough. > > I am developing a command line application using Typer. Most co

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

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

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

2024-11-14 Thread Barry via Python-list
> On 14 Nov 2024, at 14:07, Loris Bennett via Python-list > wrote: > > I don't quite understand what your suggestion is. Do you mean that I > should log to stderr and then run my program as > > my_program ... 2>&1 | logger On almost all Linux distros you would run a long running program a

Re: it's a shame... python error over error

2024-12-13 Thread Barry via Python-list
> On 13 Dec 2024, at 15:54, aotto1968 via Python-list > wrote: > > HOME/ext/x86_64-suse-linux-gnu/debug/bin/python3: error while loading shared > libraries: libpython3.12d.so.1.0: cannot open shared object file: No such > file or directory This is a debug build? Try setting LD_LIBRARY_PAT