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

2023-12-29 Thread Chris Angelico via Python-list
On Sat, 30 Dec 2023 at 06:58, Left Right wrote: > My understanding is that "welcome and encourage participation by > everyone" is in stark contradiction to banning someone disagreeing > with you. Then your understanding is flat-out wrong. Encouraging participation by everyone DOES mean deleting

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

2023-12-29 Thread Left Right via Python-list
Previously you wrote: > Here is the discussion referred to: https://discuss.python.org/t/what-is-install-paths-to-in-wheel-file/42005 This illustrates you had no idea what the discussion was about and now you write: > Oh trust me, I saw the discussion previously. Both cannot be true at the

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

2023-12-29 Thread Chris Angelico via Python-list
On Sat, 30 Dec 2023 at 01:37, Left Right wrote: > > > Yeah, because you have the God-given RIGHT to be able to say anything > > you like, on anyone's web site, and nobody's allowed to delete > > anything you say! That's how it goes, right? > > I don't believe in god, and I don't believe he / she

Re: mypy question

2023-12-29 Thread Mats Wichmann via Python-list
On 12/29/23 08:02, Karsten Hilbert via Python-list wrote: Dict[str, str] means the key type and value type should both be strings, Indeed, I know that much, list[dict[str, str]] is what is getting passed in in this particular invocation of run_rw_queries(). For what it's worth here's the

Re: Are there any easy-to-use Visual Studio C# WinForms-like GUI designers in the Python world for Tk?

2023-12-29 Thread Mats Wichmann via Python-list
On 12/28/23 18:05, Félix An via Python-list wrote: I'm used to C# WinForms, which has an easy-to-use drag-and-drop GUI designer in Visual Studio. Is there anything similar for Tk? How about Qt? What do you recommend as the easiest way to create GUI programs in Python, similar to the ease of

RE: Subject: Are there any easy-to-use Visual Studio C# WinForms-like GUI designers in the Python world for Tk?

2023-12-29 Thread Greg Walters via Python-list
> I'm used to C# WinForms, which has an easy-to-use drag-and-drop GUI designer in Visual Studio. Is there anything similar for Tk? How about Qt? What do you recommend as the easiest way to create GUI programs in Python, similar to the ease of use of C# WinForms? I can't say much for Qt other than

Re: How/where to store calibration values - written by program A, read by program B

2023-12-29 Thread Grant Edwards via Python-list
On 2023-12-28, Peter J. Holzer via Python-list wrote: > On 2023-12-28 05:20:07 +, rbowman via Python-list wrote: >> On Wed, 27 Dec 2023 03:53:42 -0600, Greg Walters wrote: >> > The biggest caveat is that the shared variable MUST exist before it can >> > be examined or used (not surprising).

Re: mypy question

2023-12-29 Thread Karsten Hilbert via Python-list
Am Fri, Dec 29, 2023 at 07:49:17AM -0700 schrieb Mats Wichmann via Python-list: > >I am not sure why mypy thinks this > > > >gmPG2.py:554: error: Argument "queries" to "run_rw_queries" has incompatible > >type "List[Dict[str, str]]"; expected > >"List[Dict[str, Union[str, List[Any], Dict[str,

Re: mypy question

2023-12-29 Thread Mats Wichmann via Python-list
On 12/29/23 05:15, Karsten Hilbert via Python-list wrote: Hi all, I am not sure why mypy thinks this gmPG2.py:554: error: Argument "queries" to "run_rw_queries" has incompatible type "List[Dict[str, str]]"; expected "List[Dict[str, Union[str, List[Any], Dict[str, Any" [arg-type]

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

2023-12-29 Thread Left Right via Python-list
> Yeah, because you have the God-given RIGHT to be able to say anything > you like, on anyone's web site, and nobody's allowed to delete > anything you say! That's how it goes, right? I don't believe in god, and I don't believe he / she can give me rights. What I believe in is that Python is a

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

2023-12-29 Thread Chris Angelico via Python-list
On Sat, 30 Dec 2023 at 01:16, Left Right via Python-list wrote: > > That's not the discussion that was toxic. But the one that was -- > doesn't exist anymore since the forum owners deleted it. > > The part where the forum owners delete whatever they disagree with is > the toxic part. Yeah,

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

2023-12-29 Thread Left Right via Python-list
That's not the discussion that was toxic. But the one that was -- doesn't exist anymore since the forum owners deleted it. The part where the forum owners delete whatever they disagree with is the toxic part. On Fri, Dec 29, 2023 at 2:57 PM Oscar Benjamin via Python-list wrote: > > On Fri, 29

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

2023-12-29 Thread Oscar Benjamin via Python-list
On Fri, 29 Dec 2023 at 13:04, Left Right via Python-list wrote: > > Wow. That place turned out to be the toxic pit I didn't expect. > > It's a shame that a public discussion of public goods was entrusted to > a bunch of gatekeepers with no sense of responsibility for the thing > they keep the

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

2023-12-29 Thread Left Right via Python-list
Wow. That place turned out to be the toxic pit I didn't expect. It's a shame that a public discussion of public goods was entrusted to a bunch of gatekeepers with no sense of responsibility for the thing they keep the keys to. On Wed, Dec 27, 2023 at 9:49 PM Left Right wrote: > > Thanks. I

Re: mypy question

2023-12-29 Thread Karsten Hilbert via Python-list
Am Fri, Dec 29, 2023 at 01:15:29PM +0100 schrieb Karsten Hilbert via Python-list: > I am not sure why mypy thinks this > > gmPG2.py:554: error: Argument "queries" to "run_rw_queries" has incompatible > type "List[Dict[str, str]]"; expected > "List[Dict[str, Union[str, List[Any], Dict[str,

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

2023-12-28 Thread Chris Angelico via Python-list
On Fri, 29 Dec 2023 at 12:23, Félix An via Python-list wrote: > > On 2023-12-25 12:36, Mike Dewhirst wrote: > > > > 3. You cannot trust Microsoft. You can trust Python Software Foundation. > > Python from PSF works the same in all environments - or if not it is a bug. > > Python from Microsoft

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

2023-12-28 Thread Félix An via Python-list
On 2023-12-25 12:36, Mike Dewhirst wrote: 3. You cannot trust Microsoft. You can trust Python Software Foundation. Python from PSF works the same in all environments - or if not it is a bug. Python from Microsoft is tweaked to satisfy their aforementioned strategy of locking in users to

Re: How/where to store calibration values - written by program A, read by program B

2023-12-28 Thread Greg Walters via Python-list
First, one of the posters got it right. Nothing is REALLY ever "written" to the file. Consider it a global variable that isn't a global variable. Assume you have two modules, A and B. Both modules import config. Furthermore, let's assume that Module B 'writes' a variable called "font"...

Re: How/where to store calibration values - written by program A, read by program B

2023-12-28 Thread Richard Damon via Python-list
On 12/28/2023 12:20 AM EST rbowman via Python-list <[1]python-list@python.org> wrote: On Wed, 27 Dec 2023 03:53:42 -0600, Greg Walters wrote: The biggest caveat is that the shared variable MUST exist before it can be examined or used (not surprising).

Re: How/where to store calibration values - written by program A, read by program B

2023-12-28 Thread Peter J. Holzer via Python-list
On 2023-12-28 05:20:07 +, rbowman via Python-list wrote: > On Wed, 27 Dec 2023 03:53:42 -0600, Greg Walters wrote: > > The biggest caveat is that the shared variable MUST exist before it can > > be examined or used (not surprising). > > There are a few other questions. Let's say config.py

Re: How/where to store calibration values - written by program A, read by program B

2023-12-28 Thread rbowman via Python-list
On Wed, 27 Dec 2023 03:53:42 -0600, Greg Walters wrote: > The biggest caveat is that the shared variable MUST exist before it can > be examined or used (not surprising). There are a few other questions. Let's say config.py contains a variable like 'font' that is a user set preference or a

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

2023-12-27 Thread Left Right via Python-list
Thanks. I tried asking there. On Sun, Dec 24, 2023 at 11:53 PM Barry wrote: > > > > 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/

Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2023-12-25 Thread MRAB via Python-list
On 2023-12-25 19:53, Alan Gauld via Python-list wrote: On 25/12/2023 05:34, geetanajali homes via Python-list wrote: import numpy as np import pandas as pd import random import matplotlib.pyplot as plt %matplotlib inline I get an error on the last line. I am running this code in Idle

Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2023-12-25 Thread Chris Angelico via Python-list
On Tue, 26 Dec 2023 at 07:27, Chris Grace via Python-list wrote: > I'd also recommend a newer version of python. Python 3.4 reached end of > life almost 5 years ago. Uhh, putting this in perspective... until a spammer revived the thread just now, it was asked, answered, and finished with, all

Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2023-12-25 Thread Chris Grace via Python-list
"%matplotlib inline" is a magic command that changes how plots render when working with IPython. Read more here: https://stackoverflow.com/a/43028034 The article you linked assumes you are working in an IPython shell, not IDLE. This is common in the data science world. You may already have

Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2023-12-25 Thread Alan Gauld via Python-list
On 25/12/2023 05:34, geetanajali homes via Python-list wrote: >> import numpy as np >> import pandas as pd >> import random >> import matplotlib.pyplot as plt >> %matplotlib inline >> >> I get an error on the last line. I am running this code in Idle Python >> 3.4.4 Shell... Python names

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

2023-12-25 Thread Mike Dewhirst via Python-list
-list Subject: Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more On Mon, 25 Dec 2023 at 15:42, Mike Dewhirst via Python-list wrote:>> Apologies for top posting - my phone seems unable to do otherwise.>> Here's my view - which may not be po

Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2023-12-25 Thread geetanajali homes via Python-list
On Friday 29 January 2016 at 12:34:47 UTC+5:30, Mike S wrote: > I have installed Python 3.4.4 on XPSP3 and am trying to work my way > through this tutorial. > > A Complete Tutorial on Ridge and Lasso Regression in Python >

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

2023-12-25 Thread rbowman via Python-list
On Sun, 24 Dec 2023 22:55:34 +, Barry wrote: >> 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

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

2023-12-24 Thread Chris Angelico via Python-list
On Mon, 25 Dec 2023 at 15:42, Mike Dewhirst via Python-list wrote: > > Apologies for top posting - my phone seems unable to do otherwise. > > Here's my view - which may not be popular. You're right about that part, anyhow :) > 4. Shebang lines are pretty much redundant now that most python

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

2023-12-24 Thread Mike Dewhirst via Python-list
Apologies for top posting - my phone seems unable to do otherwise. Here's my view - which may not be popular. 1. Py.exe is an awful idea. 2. Installing python in %PROGRAMFILES% is not a good idea 3. Installing Python from a Microsoft shop or server is a bad idea 4. Shebang lines are pretty

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: 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 --

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

2023-12-23 Thread Michael Torrie via Python-list
On 12/22/23 20:16, rbowman via Python-list wrote: > On Fri, 22 Dec 2023 17:27:58 -0700, Michael Torrie wrote: > >> Using the py launcher as your Windows association with .py and.pyw files >> you can have multiple versions of python installed and everything works >> as it should, according to your

Re: making your own DirEntry.

2023-12-23 Thread immibis via Python-list
On 12/23/23 10:48, Antoon Pardon wrote: Op 22/12/2023 om 21:39 schreef DL Neil via Python-list: Why create a DirEntry? Why not go directly to os.mkdir() or whatever? Because I have functions with DirEntry parameters. Python is duck-typed, so it's quite likely that if you pass something

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

2023-12-23 Thread Left Right via Python-list
Sorry, I found that this... documentation continues, but it doesn't make anything better. Here's what this PEP has to add (text in square brackets are my questions): If a package needs to find its files at runtime, it can request they be written to a specified file or files [does this mean a

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

2023-12-23 Thread rbowman via Python-list
On Fri, 22 Dec 2023 17:27:58 -0700, Michael Torrie wrote: > Using the py launcher as your Windows association with .py and.pyw files > you can have multiple versions of python installed and everything works > as it should, according to your shebang, just like on Unix. Does that work with

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

2023-12-23 Thread Michael Torrie via Python-list
On 12/22/23 20:56, Thomas Passin via Python-list wrote: > It's just better not to make assumptions about which version of Python > will be running. Just specify it yourself when you can, and then you can > be sure. Precisely, which is why the shebang is so useful, even on Windows with py

Re: making your own DirEntry.

2023-12-23 Thread Antoon Pardon via Python-list
Op 23/12/2023 om 12:34 schreef Barry Scott: On 23 Dec 2023, at 09:48, Antoon Pardon via Python-list wrote: Because I have functions with DirEntry parameters. I would duck-type a class I control to be my DirEnrry in this situation. Would also help you when debugging as you can tell

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

2023-12-23 Thread Barry Scott via Python-list
> On 23 Dec 2023, at 03:01, Thomas Passin via Python-list > wrote: > > Not on my system. It may depend on whether Python gets installed to Program > Files or to %USERPROFILE%/AppData/Local/Programs/Python. Python 3.9 is the > last verson I installed to Program Files, and that's the

Re: making your own DirEntry.

2023-12-23 Thread Barry Scott via Python-list
> On 23 Dec 2023, at 09:48, Antoon Pardon via Python-list > wrote: > > Because I have functions with DirEntry parameters. I would duck-type a class I control to be my DirEnrry in this situation. Would also help you when debugging as you can tell injected DirEntry from "real" DirEntry.

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

2023-12-23 Thread Peter J. Holzer via Python-list
On 2023-12-22 22:56:45 -0500, Thomas Passin via Python-list wrote: > In my experience one should always make sure to know what version of Python > is being used, at least if there is more than one version installed on the > computer. Even on Linux using a shebang line can be tricky, because you

Re: making your own DirEntry.

2023-12-23 Thread Antoon Pardon via Python-list
Op 22/12/2023 om 21:39 schreef DL Neil via Python-list: Antoon, On 12/23/23 01:00, Antoon Pardon via Python-list wrote: I am writing a program that goes through file hierarchies and I am mostly using scandir for that which produces DirEntry instances. At times it would be usefull if I could

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

2023-12-22 Thread Thomas Passin via Python-list
On 12/22/2023 7:27 PM, Michael Torrie via Python-list wrote: On 12/22/23 07:02, Thomas Passin via Python-list wrote: On my Windows 10 machine, Python scripts run without a shebang line. Perhaps Windows 11 has added the ability to use one, but then you would need to use the actual location of

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

2023-12-22 Thread Thomas Passin via Python-list
On 12/22/2023 7:19 PM, Barry wrote: 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

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

2023-12-22 Thread Michael Torrie via Python-list
On 12/22/23 07:02, Thomas Passin via Python-list wrote: > On my Windows 10 machine, Python scripts run without a shebang line. > Perhaps Windows 11 has added the ability to use one, but then you would > need to use the actual location of your Python executable. Yes if you associate .py or .pyw

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

2023-12-22 Thread Michael Torrie via Python-list
On 12/22/23 11:42, Thomas Passin via Python-list wrote: > There is some important context that is missing here. Python on Windows > does not normally install to that location. That is not even a Windows > path, neither by directory name nor by path separators. No, that's just the way the py

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

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

2023-12-22 Thread Thomas Passin via Python-list
On 12/22/2023 9:29 AM, Sibylle Koczian via Python-list wrote: Am 22.12.2023 um 14:13 schrieb Barry: 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

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

2023-12-22 Thread Thomas Passin via Python-list
On 12/22/2023 7:36 AM, 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. are associated with

Re: making your own DirEntry.

2023-12-22 Thread DL Neil via Python-list
Antoon, On 12/23/23 01:00, Antoon Pardon via Python-list wrote: I am writing a program that goes through file hierarchies and I am mostly using scandir for that which produces DirEntry instances. At times it would be usefull if I could make my own DirEntry for a specific path, however when I

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

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 Christian Buhtz via Python-list
What is the "command line" on your Windows 11? On Windows 10 it usually is "cmd.exe" (Windows Command Prompt). On Windows 11 it usually is the "Terminal" which is different from cmd.exe. -- 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 J.O. Aho via Python-list
is usually "#!/usr/bin/env python3". Disable BOM in your editor and re-save all files. -- //Aho -- 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 Sibylle Koczian via Python-list
Am 22.12.2023 um 14:13 schrieb Barry: 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

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

Re: Type hints - am I doing it right?

2023-12-13 Thread Thomas Passin via Python-list
On 12/13/2023 11:17 AM, Mats Wichmann via Python-list wrote: On 12/13/23 00:19, Frank Millman via Python-list wrote: I have to add 'import configparser' at the top of each of these modules in order to type hint the method. This seems verbose. If it is the correct way of doing it I can live

Re: Type hints - am I doing it right?

2023-12-13 Thread Mats Wichmann via Python-list
On 12/13/23 00:19, Frank Millman via Python-list wrote: I have to add 'import configparser' at the top of each of these modules in order to type hint the method. This seems verbose. If it is the correct way of doing it I can live with it, but I wondered if there was an easier way. Think of

Re: Type hints - am I doing it right?

2023-12-13 Thread Cameron Simpson via Python-list
On 13Dec2023 09:19, Frank Millman wrote: I am adding type hints to my code base. [...] In the other module I have this - def config_database(db_params): To add a type hint, I now have this - def config_database(db_params: configparser.SectionProxy): To get this to work, I have

Re: IDLE editor suggestion.

2023-12-12 Thread MRAB via Python-list
arrow key. -Original Message- From: Friedrich Romstedt Sent: Tuesday, December 12, 2023 12:52 PM To: Steve GS Cc: python-list@python.org Subject: Re: IDLE editor suggestion. Hi! Am Di., 12. Dez. 2023 um 09:28 Uhr schrieb Steve GS via Python-list : Maybe this already exists but I

RE: IDLE editor suggestion.

2023-12-12 Thread Steve GS via Python-list
Subject: Re: IDLE editor suggestion. Hi! Am Di., 12. Dez. 2023 um 09:28 Uhr schrieb Steve GS via Python-list : > > Maybe this already exists but > I have never seen it in any > editor that I have used. You might want to choose Microsoft Code from its Visual Studio family

Re: IDLE editor suggestion.

2023-12-12 Thread Mats Wichmann via Python-list
On 12/12/23 13:50, Thomas Passin via Python-list wrote: On 2023-12-12 08:22, Steve GS via Python-list wrote: > Maybe this already exists but > I have never seen it in any > editor that I have used. > > It would be nice to have a > pull-down text box that lists > all of the searches I have

Re: IDLE editor suggestion.

2023-12-12 Thread Thomas Passin via Python-list
On 2023-12-12 08:22, Steve GS via Python-list wrote: > Maybe this already exists but > I have never seen it in any > editor that I have used. > > It would be nice to have a > pull-down text box that lists > all of the searches I have > used during this session. It > would make editing a lot >

Re: IDLE editor suggestion.

2023-12-12 Thread Friedrich Romstedt via Python-list
Hi! Am Di., 12. Dez. 2023 um 09:28 Uhr schrieb Steve GS via Python-list : > > Maybe this already exists but > I have never seen it in any > editor that I have used. You might want to choose Microsoft Code from its Visual Studio family of software, or, if you're ready for a deep dive, you might

Re: IDLE editor suggestion.

2023-12-12 Thread MRAB via Python-list
On 2023-12-12 08:22, Steve GS via Python-list wrote: Maybe this already exists but I have never seen it in any editor that I have used. It would be nice to have a pull-down text box that lists all of the searches I have used during this session. It would make editing a lot easier if I could

RE: A problem with str VS int.

2023-12-12 Thread AVI GROSS via Python-list
aracter strings to mean anything unless programmed to examine them a certain way. And often, the same people cannot sole a simple puzzle like "SEND" + "MORE" == "MONEY" -Original Message- From: Python-list On Behalf Of Roel Schroeven via Python-list Sent: Tue

Re: A problem with str VS int.

2023-12-12 Thread dn via Python-list
On 12/12/23 21:22, Steve GS wrote: With all these suggestions on how to fix it, no one seems to answer why it fails only when entering a two-digit number. One and three work fine when comparing with str values. It is interesting that the leading 0 on a two digit worked. Still, one digit and

Re: A problem with str VS int.

2023-12-12 Thread Roel Schroeven via Python-list
Op 12/12/2023 om 9:22 schreef Steve GS via Python-list: With all these suggestions on how to fix it, no one seems to answer why it fails only when entering a two-digit number. One and three work fine when comparing with str values. It is interesting that the leading 0 on a two digit worked.

RE: A problem with str VS int.

2023-12-12 Thread Steve GS via Python-list
. This is now more of a curiosity as I did use the integer comparisons. SGA -Original Message- From: Python-list On Behalf Of dn via Python-list Sent: Sunday, December 10, 2023 12:53 AM To: python-list@python.org Subject: Re: A problem with str VS int. On 10/12/23 15:42, Steve GS via Python-list

Re: How to enter multiple, similar, dictionaries?

2023-12-11 Thread Piergiorgio Sartor via Python-list
On 11/12/2023 16.16, Chris Green wrote: Is there a way to abbreviate the following code somehow? lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'} sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'} la = {'dev':'bbb', 'input':'2', 'name':'Leisure Amps'} sa =

Re: How to enter multiple, similar, dictionaries?

2023-12-11 Thread Chris Green via Python-list
Jon Ribbens wrote: > On 2023-12-11, Chris Green wrote: > > Chris Green wrote: > >> Is there a way to abbreviate the following code somehow? > >> > >> lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'} > >> sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'} > >> la =

Re: How to enter multiple, similar, dictionaries?

2023-12-11 Thread Jon Ribbens via Python-list
On 2023-12-11, Chris Green wrote: > Chris Green wrote: >> Is there a way to abbreviate the following code somehow? >> >> lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'} >> sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'} >> la = {'dev':'bbb', 'input':'2',

Re: How to enter multiple, similar, dictionaries?

2023-12-11 Thread MRAB via Python-list
On 2023-12-11 15:57, Chris Green via Python-list wrote: Chris Green wrote: Is there a way to abbreviate the following code somehow? lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'} sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'} la = {'dev':'bbb', 'input':'2',

Re: How to enter multiple, similar, dictionaries?

2023-12-11 Thread Grant Edwards via Python-list
On 2023-12-11, Chris Green via Python-list wrote: > Is there a way to abbreviate the following code somehow? > > lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'} > sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'} > la = {'dev':'bbb', 'input':'2', 'name':'Leisure Amps'} >

Re: How to enter multiple, similar, dictionaries?

2023-12-11 Thread Chris Green via Python-list
Chris Green wrote: > Is there a way to abbreviate the following code somehow? > > lv = {'dev':'bbb', 'input':'1', 'name':'Leisure volts'} > sv = {'dev':'bbb', 'input':'0', 'name':'Starter volts'} > la = {'dev':'bbb', 'input':'2', 'name':'Leisure Amps'} > sa = {'dev':'bbb',

Re: A problem with str VS int.

2023-12-09 Thread dn via Python-list
On 10/12/23 15:42, Steve GS via Python-list wrote: If I enter a one-digit input or a three-digit number, the code works but if I enter a two digit number, the if statement fails and the else condition prevails. tsReading = input(" Enter the " + Brand + " test strip reading: ")

Re: A problem with str VS int.

2023-12-09 Thread Thomas Passin via Python-list
On 12/9/2023 9:42 PM, Steve GS via Python-list wrote: If I enter a one-digit input or a three-digit number, the code works but if I enter a two digit number, the if statement fails and the else condition prevails. tsReading = input(" Enter the " + Brand + " test strip reading: ")

RE: A problem with str VS int.

2023-12-09 Thread AVI GROSS via Python-list
Steve, I would say converting to a number, as you eventually did, is the way to go. When you compare character strings, it will not be in numeric order. Compare "80" with "400" and since 8 is greater than 4, the comparison is over and "80" is greater then "40" even though 80 is way less than

Re: How/where to store calibration values - written by program A, read by program B

2023-12-09 Thread Peter J. Holzer via Python-list
On 2023-12-06 07:23:51 -0500, Thomas Passin via Python-list wrote: > On 12/6/2023 6:35 AM, Barry Scott via Python-list wrote: > > Personally I would not use .ini style these days as the format does not > > include type of the data. > > Neither does JSON. Well, it distinguishes between some

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread Thomas Passin via Python-list
On 12/6/2023 1:12 PM, MRAB via Python-list wrote: On 2023-12-06 12:23, Thomas Passin via Python-list wrote: On 12/6/2023 6:35 AM, Barry Scott via Python-list wrote: On 6 Dec 2023, at 09:32, Chris Green via Python-list wrote: My requirement is *slightly* more complex than just key value

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread MRAB via Python-list
On 2023-12-06 20:11, dn via Python-list wrote: On 7/12/23 07:12, MRAB via Python-list wrote: On 2023-12-06 12:23, Thomas Passin via Python-list wrote: On 12/6/2023 6:35 AM, Barry Scott via Python-list wrote: On 6 Dec 2023, at 09:32, Chris Green via Python-list wrote: My requirement is

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread dn via Python-list
On 7/12/23 07:12, MRAB via Python-list wrote: On 2023-12-06 12:23, Thomas Passin via Python-list wrote: On 12/6/2023 6:35 AM, Barry Scott via Python-list wrote: On 6 Dec 2023, at 09:32, Chris Green via Python-list wrote: My requirement is *slightly* more complex than just key value

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread MRAB via Python-list
On 2023-12-06 12:23, Thomas Passin via Python-list wrote: On 12/6/2023 6:35 AM, Barry Scott via Python-list wrote: On 6 Dec 2023, at 09:32, Chris Green via Python-list wrote: My requirement is *slightly* more complex than just key value pairs, it has one level of hierarchy, e.g.:-

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread Thomas Passin via Python-list
On 12/6/2023 6:35 AM, Barry Scott via Python-list wrote: On 6 Dec 2023, at 09:32, Chris Green via Python-list wrote: My requirement is *slightly* more complex than just key value pairs, it has one level of hierarchy, e.g.:- KEY1: a: v1 c: v3 d: v4 KEY2: a:

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread Dan Purgert via Python-list
n application-specific configuration directory). Or an .ini file with two sections (although I don't think you can re-use key-names in a single ini file) -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860 -- https://mail.python.org/mailman/listinfo/python-list

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread Barry Scott via Python-list
> On 6 Dec 2023, at 09:32, Chris Green via Python-list > wrote: > > My requirement is *slightly* more complex than just key value pairs, > it has one level of hierarchy, e.g.:- > >KEY1: > a: v1 > c: v3 > d: v4 >KEY2: > a: v7 > b: v5 > d: v6 > >

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread Dan Sommers via Python-list
On 2023-12-06 at 09:32:02 +, Chris Green via Python-list wrote: > Thomas Passin wrote: [...] > > Just go with an .ini file. Simple, well-supported by the standard > > library. And it gives you key/value pairs. > > > My requirement is *slightly* more complex than just key value pairs, >

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread Chris Green via Python-list
Thank you everyone for all the suggestions, I now have several possibilities to follow up. :-) -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread Chris Green via Python-list
Thomas Passin wrote: > On 12/5/2023 11:50 AM, MRAB via Python-list wrote: > > On 2023-12-05 14:37, Chris Green via Python-list wrote: > >> Is there a neat, pythonic way to store values which are 'sometimes' > >> changed? > >> > >> My particular case at the moment is calibration values for ADC

Re: How/where to store calibration values - written by program A, read by program B

2023-12-06 Thread Chris Green via Python-list
Paul Rubin wrote: > Chris Green writes: > > I could simply write the values to a file (or a database) and I > > suspect that this may be the best answer but it does make retrieving > > the values different from getting all other (nearly) constant values. > > I've used configparser for this,

Re: How/where to store calibration values - written by program A, read by program B

2023-12-05 Thread Thomas Passin via Python-list
On 12/5/2023 11:50 AM, MRAB via Python-list wrote: On 2023-12-05 14:37, Chris Green via Python-list wrote: Is there a neat, pythonic way to store values which are 'sometimes' changed? My particular case at the moment is calibration values for ADC inputs which are set by running a calibration

Re: How/where to store calibration values - written by program A, read by program B

2023-12-05 Thread DL Neil via Python-list
Apologies: neglected suggested web.refs: https://datagy.io/python-environment-variables/ https://pypi.org/project/json_environ/ -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How/where to store calibration values - written by program A, read by program B

2023-12-05 Thread DL Neil via Python-list
On 12/6/23 03:37, Chris Green via Python-list wrote: Is there a neat, pythonic way to store values which are 'sometimes' changed? My particular case at the moment is calibration values for ADC inputs which are set by running a calibration program and used by lots of programs which display the

Re: How/where to store calibration values - written by program A, read by program B

2023-12-05 Thread Barry Scott via Python-list
> On 5 Dec 2023, at 14:37, Chris Green via Python-list > wrote: > > Are there any Python modules aimed specifically at this sort of > requirement? I tend to use JSON for this type of thing. Suggest that you use the options to pretty print the json that is saved so that a human can read it.

Re: How/where to store calibration values - written by program A, read by program B

2023-12-05 Thread Mats Wichmann via Python-list
On 12/5/23 07:37, Chris Green via Python-list wrote: Is there a neat, pythonic way to store values which are 'sometimes' changed? My particular case at the moment is calibration values for ADC inputs which are set by running a calibration program and used by lots of programs which display the

Re: How/where to store calibration values - written by program A, read by program B

2023-12-05 Thread MRAB via Python-list
On 2023-12-05 14:37, Chris Green via Python-list wrote: Is there a neat, pythonic way to store values which are 'sometimes' changed? My particular case at the moment is calibration values for ADC inputs which are set by running a calibration program and used by lots of programs which display

Re: on writing a number as 2^s * q, where q is odd

2023-12-05 Thread jak via Python-list
Alan Bawden ha scritto: If you like this sort of stuff, check out the book "Hacker's Delight" by Henry Warren. See. Thank you for your suggestion. Really interesting. Just for fun I tried to port the function to 64 bit: def bit_count_64(n):

Re: on writing a number as 2^s * q, where q is odd

2023-12-05 Thread Alan Bawden via Python-list
jak writes: Oscar Benjamin ha scritto: ... If we now use the function being discussed: powers_of_2_in(n) (63, 1) we can see that the bit_count() method had to do 63 iterations to count the bits I certainly hope that the bit_count method doesn't count bits by iterating

Re: Request: inspect: signature & getfullargspec & getcallargs

2023-12-04 Thread Barry Scott via Python-list
> On 4 Dec 2023, at 02:29, Dom Grigonis via Python-list > wrote: > > Hello, > > I have a request. > > Would it be possible to include `follow_wrapper_chains` and `skip_bound_arg` > arguments to higher level functions of `inspect` module? > > Would exposing them, but setting defaults to

<    3   4   5   6   7   8   9   10   11   12   >