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

2024-03-08 Thread Grant Edwards via Python-list
On 2024-03-08, Grant Edwards via Python-list wrote: >> OSError: [Errno 36] File name too long: >>

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

2024-03-08 Thread Grant Edwards via Python-list
On 2024-03-08, Grant Edwards via Python-list wrote: > On 2024-03-08, Thomas Passin via Python-list wrote: >> On 3/8/2024 1:03 PM, Albert-Jan Roskam via Python-list wrote: >>> Hi, >>> I was replacing some os.path stuff with Pathlib and I discovered this: >>> Path(256 * "x").is_file()

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

2024-03-08 Thread Grant Edwards via Python-list
On 2024-03-08, Thomas Passin via Python-list wrote: > On 3/8/2024 1:03 PM, Albert-Jan Roskam via Python-list wrote: >> Hi, >> I was replacing some os.path stuff with Pathlib and I discovered this: >> Path(256 * "x").is_file() # OSError >> os.path.isfile(256 * "x") # bool >>

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

2024-03-08 Thread Thomas Passin via Python-list
On 3/8/2024 1:03 PM, Albert-Jan Roskam via Python-list wrote: Hi, I was replacing some os.path stuff with Pathlib and I discovered this: Path(256 * "x").is_file() # OSError os.path.isfile(256 * "x") # bool Is this intended? Does pathlib try to resemble os.path as closely as

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

2024-03-08 Thread Albert-Jan Roskam via Python-list
Hi, I was replacing some os.path stuff with Pathlib and I discovered this: Path(256 * "x").is_file() # OSError os.path.isfile(256 * "x") # bool Is this intended? Does pathlib try to resemble os.path as closely as possible? Best wishes, Albert-Jan --

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-08 Thread Grant Edwards via Python-list
On 2024-03-08, Chris Angelico via Python-list wrote: > On Sat, 9 Mar 2024 at 00:51, Grant Edwards via Python-list > wrote: > >> One might argue that "global" isn't a good choice for what to call the >> scope in question, since it's not global. It's limited to that source >> file. It doesn't make

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-08 Thread Chris Angelico via Python-list
On Sat, 9 Mar 2024 at 00:51, Grant Edwards via Python-list wrote: > One might argue that "global" isn't a good choice for what to call the > scope in question, since it's not global. It's limited to that source > file. It doesn't make sense to me to call a binding "global", when > there can be

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-08 Thread Grant Edwards via Python-list
On 2024-03-07, Cameron Simpson via Python-list wrote: > Yes. Note that the "global" namespace is the module in which the > function is defined. One might argue that "global" isn't a good choice for what to call the scope in question, since it's not global. It's limited to that source file. It

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-07 Thread Cameron Simpson via Python-list
On 06Mar2024 15:12, Jacob Kruger wrote: So, this does not make sense to me in terms of the following snippet from the official python docs page: https://docs.python.org/3/faq/programming.html "In Python, variables that are only referenced inside a function are implicitly global. If a

Re: If a dictionary key has a Python list as its value!

2024-03-07 Thread Mats Wichmann via Python-list
On 3/7/24 07:11, Varuna Seneviratna via Python-list wrote: If a dictionary key has a Python list as its value, you can read the values one by one in the list using a for-loop like in the following. d = {k: [1,2,3]} for v in d[k]: print(v) No tutorial describes this, why? What is the

Re: If a dictionary key has a Python list as its value!

2024-03-07 Thread MRAB via Python-list
On 2024-03-07 14:11, Varuna Seneviratna via Python-list wrote: If a dictionary key has a Python list as its value, you can read the values one by one in the list using a for-loop like in the following. d = {k: [1,2,3]} for v in d[k]: print(v) No tutorial describes this, why? What is

If a dictionary key has a Python list as its value!

2024-03-07 Thread Varuna Seneviratna via Python-list
If a dictionary key has a Python list as its value, you can read the values one by one in the list using a for-loop like in the following. d = {k: [1,2,3]} > for v in d[k]: > print(v) No tutorial describes this, why? What is the Python explanation for this behaviour? Varuna --

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-07 Thread Jacob Kruger via Python-list
Thanks again, all. I think the python -i scoping2.py would have given me a good beginning as well - will archive that one for use. And, to maybe explain how I work - not an excuse at all - but, I am actually 100% blind, so a lot of the IDE's, or their common means/methods of interaction

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Grant Edwards via Python-list
On 2024-03-07, dn via Python-list wrote: > The idea of importing a module into the REPL and then (repeatedly) > manually entering the code to set-up and execute is unusual (surely type > such into a script (once), and run that (repeatedly). As you say, most > of us would be working from an

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread dn via Python-list
On 7/03/24 05:28, Jacob Kruger via Python-list wrote: ... So, yes, know this comes across like some form of a scam/joke, or list-garbage, since it doesn't make any sense to me at all, but still just wondering if missing something, or should I shift over to 3.12 to see if if works differently,

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Roel Schroeven via Python-list
Grant Edwards via Python-list schreef op 6/03/2024 om 18:59: On 2024-03-06, Roel Schroeven via Python-list wrote: > Op 6/03/2024 om 17:40 schreef Jacob Kruger via Python-list: >> >>> from scoping2 import * > > [...] > > I would advice not to use 'import *', if at all possible, for multiple

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Grant Edwards via Python-list
On 2024-03-06, Roel Schroeven via Python-list wrote: > Op 6/03/2024 om 17:40 schreef Jacob Kruger via Python-list: >> >>> from scoping2 import * > > [...] > > I would advice not to use 'import *', if at all possible, for multiple > reasons, one of which is to prevent problems like this.

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Roel Schroeven via Python-list
Op 6/03/2024 om 17:40 schreef Jacob Kruger via Python-list: >>> from scoping2 import * Ah yes, that explains what's happening. After that statement, the name dt_expiry in the current namespace is bound to the same object that the name dt_expiry in the namespace of module scoping2 is bound to.

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Jacob Kruger via Python-list
Ok, Ethan, that makes sense - I generally work with modules in folders, etc., but, this was just test code, but, 'see' if I instead import scoping2 as sc2, and then refer to sc2.dt_expiry and sc2.do_it, then it does operate as it should - thanks, again. Jacob Kruger +2782 413 4791

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Ethan Furman via Python-list
On 3/6/24 08:28, Jacob Kruger via Python-list wrote: > C:\temp\py_try>python > Python 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:24:49) [MSC v.1937 64 bit (AMD64)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> from scoping2 import * And it becomes

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Jacob Kruger via Python-list
You'll see more details in other mail, but, here I am firing up standard python interpreter from within windows terminal, and then executing following line: from scoping2 import * And, this is under windows 11 windows terminal, which is where I generally interact with my python code, via

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Jacob Kruger via Python-list
Matt, other mail is more relevant - seems to maybe have more to do with different behavour if import code, or not - no, does not make sense to me - but, here's the command line contents including printing out id() results, but, only working via importing code: #---start session---

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Jacob Kruger via Python-list
Thanks for all your input people, and, yes, I know that besides the scope oddities the rest of the code is not my normal style either - was partly due to forms of experimentation to try figure out what could be causing issues. For example, instead of [:] syntax, was specifically using copy()

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Roel Schroeven via Python-list
Op 6/03/2024 om 16:39 schreef Roel Schroeven via Python-list: Op 6/03/2024 om 13:55 schreef Jacob Kruger via Python-list: If you import the contents of that file into the python interpreter, [...] What exactly to you mean by "import the contents of that file into the python interpreter"?

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Roel Schroeven via Python-list
Op 6/03/2024 om 13:55 schreef Jacob Kruger via Python-list: If you import the contents of that file into the python interpreter, [...] What exactly to you mean by "import the contents of that file into the python interpreter"? Other people have put your code in a script, executed it, and saw

Re: Can u help me?

2024-03-06 Thread Grant Edwards via Python-list
On 2024-03-06, MRAB via Python-list wrote: > On 2024-03-06 01:44, Ethan Furman via Python-list wrote: >> On 3/5/24 16:49, MRAB via Python-list wrote: >> > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >> >> >>>

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Thomas Passin via Python-list
On 3/6/2024 7:55 AM, Jacob Kruger via Python-list wrote: Ok, simpler version - all the code in a simpler test file, and working with two separate variables to explain exactly what am talking about: # start code from datetime import datetime, timezone, timedelta from copy import copy #

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Thomas Passin via Python-list
On 3/6/2024 5:59 AM, Alan Gauld via Python-list wrote: On 05/03/2024 22:46, Grant Edwards via Python-list wrote: Unfortunately (presumably thanks to SEO) the enshittification of Google has reached the point where searching for info on things like Python name scope, the first page of links are

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Mats Wichmann via Python-list
On 3/6/24 05:55, Jacob Kruger via Python-list wrote: Ok, simpler version - all the code in a simpler test file, and working with two separate variables to explain exactly what am talking about: If you import the contents of that file into the python interpreter, dt_expiry will start off as

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Jacob Kruger via Python-list
So, this does not make sense to me in terms of the following snippet from the official python docs page: https://docs.python.org/3/faq/programming.html "In Python, variables that are only referenced inside a function are implicitly global. If a variable is assigned a value anywhere within

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Jacob Kruger via Python-list
Ok, simpler version - all the code in a simpler test file, and working with two separate variables to explain exactly what am talking about: # start code from datetime import datetime, timezone, timedelta from copy import copy # initialise original values dt_expiry =

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-06 Thread Alan Gauld via Python-list
On 05/03/2024 22:46, Grant Edwards via Python-list wrote: > Unfortunately (presumably thanks to SEO) the enshittification of > Google has reached the point where searching for info on things like > Python name scope, the first page of links are to worthless sites like > geeksforgeeks. And not just

Re: Can u help me?

2024-03-05 Thread MRAB via Python-list
On 2024-03-06 01:44, Ethan Furman via Python-list wrote: On 3/5/24 16:49, MRAB via Python-list wrote: > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >>> [image: image.png] >> >> The image is of MS-Windows with the

Re: Can u help me?

2024-03-05 Thread Mats Wichmann via Python-list
On 3/5/24 18:44, Ethan Furman via Python-list wrote: On 3/5/24 16:49, MRAB via Python-list wrote: > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >>> [image: image.png] >> >> The image is of MS-Windows with the python

Re: Can u help me?

2024-03-05 Thread Ethan Furman via Python-list
On 3/5/24 16:49, MRAB via Python-list wrote: > On 2024-03-06 00:24, Ethan Furman via Python-list wrote: >> On 3/5/24 16:06, Chano Fucks via Python-list wrote: >> >>> [image: image.png] >> >> The image is of MS-Windows with the python installation window of "Repair Successful". Hopefully

Re: Can u help me?

2024-03-05 Thread MRAB via Python-list
On 2024-03-06 00:24, Ethan Furman via Python-list wrote: On 3/5/24 16:06, Chano Fucks via Python-list wrote: [image: image.png] The image is of MS-Windows with the python installation window of "Repair Successful". Hopefully somebody better at explaining that problem can take it from

Re: Can u help me?

2024-03-05 Thread MRAB via Python-list
On 2024-03-06 00:06, Chano Fucks via Python-list wrote: [image: image.png] This list removes all images. -- https://mail.python.org/mailman/listinfo/python-list

Re: Can u help me?

2024-03-05 Thread Ethan Furman via Python-list
On 3/5/24 16:06, Chano Fucks via Python-list wrote: [image: image.png] The image is of MS-Windows with the python installation window of "Repair Successful". Hopefully somebody better at explaining that problem can take it from here... -- ~Ethan~ --

Can u help me?

2024-03-05 Thread Chano Fucks via Python-list
[image: image.png] -- https://mail.python.org/mailman/listinfo/python-list

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-05 Thread Grant Edwards via Python-list
On 2024-03-05, Cameron Simpson via Python-list wrote: > Because there are no variable definitions in Python, when you write > a function Python does a static analysis of it to decide which > variables are local and which are not. If there's an assignment to a > variable, it is a local variable.

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-05 Thread Cameron Simpson via Python-list
On 05Mar2024 20:13, Jacob Kruger wrote: Now, what almost seems to be occurring, is that while just manipulating the contents of a referenced variable is fine in this context, the moment I try to reassign it, that's where the issue is occurring . Because there are no variable definitions in

Re: Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-05 Thread dn via Python-list
Jacob, Please reduce the problem to a small code-set which reproduces the problem. If we can reproduce same, then that tells us something. At the very least, we can experiment without having to expend amounts of time in a (likely faulty) bid to reproduce the same environment. Also, code is

Variable scope inside and outside functions - global statement being overridden by assignation unless preceded by reference

2024-03-05 Thread Jacob Kruger via Python-list
Hi there Working with python 3.11, and, issue that confused me for a little while, trying to figure out what was occurring - unless am completely confused, or missing something - was that, for example, when having pre-defined a variable, and then included it in the global statement inside a

Cheetah 3.3.3.post1

2024-02-28 Thread Oleg Broytman via Python-list
Hello! I'm pleased to announce version 3.3.3.post1, the first post-release of release 3.3.3 of branch 3.3 of CheetahTemplate3. What's new in CheetahTemplate3 == CI: - GHActions: Build and publish wheels on Linux/aarch64. What is CheetahTemplate3

Transparent label background?

2024-02-28 Thread Steve GS via Python-list
My window is to have a label over an image. How do I place a label that has a transparent background so as to not have the square of the label look so obnoxious? SGA -- https://mail.python.org/mailman/listinfo/python-list

Re: (Mastermind) puzzle (with 3 digits) -- Elegant (readable) code Sought

2024-02-27 Thread Greg Ewing via Python-list
On 26/02/24 12:45 pm, Lawrence D'Oliveiro wrote: def score(candidate, answer) : return \ ( sum(a == b for a, b in zip(candidate, answer)), sum ( i != j and a == b for i, a in enumerate(candidate)

Re: RE: Problem resizing a window and button placement

2024-02-27 Thread Alan Gauld via Python-list
On 27/02/2024 07:13, Steve GS via Python-list wrote: > Aside from using it to resized > the window, is there no way to > know the last value of the > change for use in the program? The last value would be the current width. And you know how to get that as shown in your configure function: Ww =

RE: Problem resizing a window and button placement

2024-02-26 Thread Steve GS via Python-list
>> The configuration event hasn't fired at the time you include the print statement in the handler's def block, and therefore the print function inside your handler hasn't invoked. It won't be invoked until you resize the window. Exactly >> There is no point (really?) to saving the width

Re: Problem resizing a window and button placement

2024-02-26 Thread Thomas Passin via Python-list
On 2/26/2024 6:02 AM, Steve GS via Python-list wrote: Although your code produces the value of Ww outside the function, I do not see how I can use the value of Ww unless I close the program. The configuration event hasn't fired at the time you include the print statement in the handler's def

Re: RE: RE: Problem resizing a window and button placement

2024-02-26 Thread Alan Gauld via Python-list
On 26/02/2024 11:02, Steve GS via Python-list wrote: > Although your code produces the value of Ww outside the function, > I do not see how I can use the value of Ww unless I close the program. You have to use a function that operates inside the mainloop. Thats the nature of event driven

RE: RE: Problem resizing a window and button placement

2024-02-26 Thread Steve GS via Python-list
Although your code produces the value of Ww outside the function, I do not see how I can use the value of Ww unless I close the program. import tkinter as tk Ww = None # What does this do? Why not Integer? WwZ = None def on_configure(*args): global Ww global WwZ Ww =

Re: RE: Problem resizing a window and button placement

2024-02-26 Thread Alan Gauld via Python-list
On 26/02/2024 07:56, Steve GS via Python-list wrote: > Then there is that discovery > element: Why is my original > idea not working? I still > cannot pass the value back > from the function. What is > different about this function > that others would have given > me the value? There is nothing

RE: Problem resizing a window and button placement

2024-02-26 Thread Steve GS via Python-list
Musta misstit I had thought of that before I started the discussion but figured it would take more code than it finally needed. I guess I was also variable-dependent thinking that I would need the result elsewhere in the code. So far, I see that I don't need the value. Then there is that

RE: Problem resizing a window and button placement

2024-02-26 Thread Steve GS via Python-list
Ww Inside = <250> Ww Inside = <249> Ww Inside = <250> Ww Outside = <1770662408256on_configure> Here is my result... SGA -Original Message- From: Python-list On Behalf Of MRAB via Python-list Sent: Sunday, February 25, 2024 6:40 PM To: python-list@python.org Subject: Re: Problem

Re: Problem resizing a window and button placement

2024-02-25 Thread MRAB via Python-list
On 2024-02-25 21:19, Steve GS via Python-list wrote: SOLUTION FOUND! The fix was to write the code that uses the width value and to place it into the function itself. Kluge? Maybe but it works. Mischief Managed. As for the most recent suggestion, it fails for me:

Re: Problem resizing a window and button placement

2024-02-25 Thread Thomas Passin via Python-list
On 2/25/2024 4:19 PM, Steve GS via Python-list wrote: SOLUTION FOUND! The fix was to write the code that uses the width value and to place it into the function itself. Kluge? Maybe but it works. Right, just what I wrote earlier: "have the function that responds to the resize event perform

RE: RE: Problem resizing a window and button placement

2024-02-25 Thread Steve GS via Python-list
SOLUTION FOUND! The fix was to write the code that uses the width value and to place it into the function itself. Kluge? Maybe but it works. Mischief Managed. As for the most recent suggestion, it fails for me: Traceback (most recent call last): File

Re: RE: Problem resizing a window and button placement

2024-02-25 Thread Alan Gauld via Python-list
On 25/02/2024 03:58, Steve GS via Python-list wrote: import tkinter as tk Ww = None def on_configure(*args): global Ww Ww = root.winfo_width() print("Ww Inside = <" + str(Ww) + ">") root = tk.Tk() root.bind('', on_configure) root.mainloop() print("Ww Outside = <" + str(Ww)

RE: Problem resizing a window and button placement

2024-02-24 Thread Steve GS via Python-list
So, how do I use the width value in my code? SGA -Original Message- From: Python-list On Behalf Of MRAB via Python-list Sent: Saturday, February 24, 2024 10:36 PM To: python-list@python.org Subject: Re: Problem resizing a window and button placement On 2024-02-25 02:51, Steve GS

RE: Problem resizing a window and button placement

2024-02-24 Thread Steve GS via Python-list
The print statement in the function prints. Does that not mean that the function is being called? SGA -Original Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Saturday, February 24, 2024 10:39 PM To: python-list@python.org Subject: Re: Problem resizing a

Re: Problem resizing a window and button placement

2024-02-24 Thread MRAB via Python-list
On 2024-02-25 02:51, Steve GS wrote: import tkinter as tk #global Ww Neither global helps def on_configure(*args): # print(args) #global Ww Neither global helps Ww = root.winfo_width() print("WwInside = <" + str(Ww) + ">") root = tk.Tk() root.bind('', on_configure)

Re: Problem resizing a window and button placement

2024-02-24 Thread Thomas Passin via Python-list
On 2/24/2024 9:51 PM, Steve GS via Python-list wrote: First of all, please make sure that the formatting is readable and especially the indentation. This is Python, after all. Do not use tabs; use 3 or 4 spaces instead of each tab. import tkinter as tk #global Ww Neither global helps def

RE: Problem resizing a window and button placement

2024-02-24 Thread Steve GS via Python-list
import tkinter as tk #global Ww Neither global helps def on_configure(*args): # print(args) #global Ww Neither global helps Ww = root.winfo_width() print("WwInside = <" + str(Ww) + ">") root = tk.Tk() root.bind('', on_configure) print("WwOutside = <" + str(Ww) + ">")

Re: Problem resizing a window and button placement

2024-02-24 Thread MRAB via Python-list
On 2024-02-25 00:33, Steve GS via Python-list wrote: "Well, yes, in Python a variable created inside a function or method is local to that function unless you declare it global." Yes, I knew that. I tried to global it both before the function call and within it. Same for when I created the

RE: Problem resizing a window and button placement

2024-02-24 Thread Steve GS via Python-list
"Well, yes, in Python a variable created inside a function or method is local to that function unless you declare it global." Yes, I knew that. I tried to global it both before the function call and within it. Same for when I created the variable. If I try to use it in the rest of the code, it

Re: Problem resizing a window and button placement

2024-02-24 Thread Grant Edwards via Python-list
On 2024-02-24, MRAB via Python-list wrote: > On 2024-02-24 01:14, Steve GS via Python-list wrote: > >> Python, Tkinter: How do I determine if a window has been resized? I >> want to locate buttons vertically along the right border and need >> to know the new width. The buttons are to move with

Re: Problem resizing a window and button placement

2024-02-24 Thread Thomas Passin via Python-list
On 2/24/2024 3:20 AM, Steve GS via Python-list wrote: Yes, I ran that elegantly simple code. The print statement reports the X, Y, Height and Width values. However, I do not see how to capture the width value. I experimented with the code Vwidth = rootV.winfo_width() and it also reports the

RE: Problem resizing a window and button placement

2024-02-24 Thread Steve GS via Python-list
Yes, I ran that elegantly simple code. The print statement reports the X, Y, Height and Width values. However, I do not see how to capture the width value. I experimented with the code Vwidth = rootV.winfo_width() and it also reports the width as I resize the window. However, I cannot seem to

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

RE: Problem resizing a window and button placement

2024-02-23 Thread Steve GS via Python-list
How do I extract the values from args? SGA -Original Message- From: Python-list On Behalf Of MRAB via Python-list Sent: Friday, February 23, 2024 9:27 PM To: python-list@python.org Subject: Re: Problem resizing a window and button placement On 2024-02-24 01:14, Steve GS via Python-list

Re: Problem resizing a window and button placement

2024-02-23 Thread MRAB via Python-list
On 2024-02-24 01:14, Steve GS via Python-list wrote: Python, Tkinter: How do I determine if a window has been resized? I want to locate buttons vertically along the right border and need to know the new width. The buttons are to move with the change of location of the right-side border. Bind

Problem resizing a window and button placement

2024-02-23 Thread Steve GS via Python-list
Python, Tkinter: How do I determine if a window has been resized? I want to locate buttons vertically along the right border and need to know the new width. The buttons are to move with the change of location of the right-side border. SGA --

Re: Testing (sorry)

2024-02-20 Thread Peter J. Holzer via Python-list
On 2024-02-19 11:38:54 -0500, Thomas Passin via Python-list wrote: > On 2/19/2024 9:17 AM, Grant Edwards via Python-list wrote: > > On 2024-02-19, Thomas Passin wrote: > > > > About 24 hours later, all of my posts (and the confirmation e-mails) > > > > all showed up in a burst at the same time on

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread dn via Python-list
On 20/02/24 01:04, Chris Green via Python-list wrote: dn wrote: On 18/02/24 09:53, Grant Edwards via Python-list wrote: On 2024-02-17, Cameron Simpson via Python-list wrote: On 16Feb2024 22:12, Chris Green wrote: I'm looking for a simple way to make NaN values output as something like '-'

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread dn via Python-list
On 20/02/24 05:58, Grant Edwards via Python-list wrote: Here's a demonstration of how to hook custom code into the f-string formatting engine. It's brilliantly depraved. https://stackoverflow.com/questions/55876683/hook-into-the-builtin-python-f-string-format-machinery From the above:

Re: Testing (sorry)

2024-02-19 Thread Thomas Passin via Python-list
On 2/19/2024 11:55 AM, Skip Montanaro wrote: Here is a typical bounce message that I get: mailto:python-list@python.org>>: host mail.python.org [188.166.95.178] said: 450-4.3.2      Service currently unavailable 450 4.3.2 Some time after I get

Matplotlib warning [error?] message

2024-02-19 Thread Leif Svalgaard via Python-list
now I get: File e:\getmodpot.py:40 fig,ax = initPlot() File E:\mystuff.py:272 in initPlot fig,ax = plt.subplots(figsize=(xs,ys)) File ~\anaconda3\Lib\site-packages\matplotlib\pyplot.py:1501 in subplots fig = figure(**fig_kw) File

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread Grant Edwards via Python-list
On 2024-02-19, Chris Green via Python-list wrote: > It's using f'{...}' at the moment. Here's a demonstration of how to hook custom code into the f-string formatting engine. It's brilliantly depraved.

Re: Testing (sorry)

2024-02-19 Thread Skip Montanaro via Python-list
> > Here is a typical bounce message that I get: > > : host mail.python.org[188.166.95.178] said: > 450-4.3.2 > Service currently unavailable 450 4.3.2 > > Some time after I get one of these messages I re-send the post. Usually > it gets through then. > Looks kinda like greylisting to me.

Re: Testing (sorry)

2024-02-19 Thread Thomas Passin via Python-list
On 2/19/2024 9:17 AM, Grant Edwards via Python-list wrote: On 2024-02-19, Thomas Passin wrote: About 24 hours later, all of my posts (and the confirmation e-mails) all showed up in a burst at the same time on two different unrelated e-mail accounts. I still have no clue what was going on...

Re: Testing (sorry)

2024-02-19 Thread Grant Edwards via Python-list
On 2024-02-19, Thomas Passin wrote: >> About 24 hours later, all of my posts (and the confirmation e-mails) >> all showed up in a burst at the same time on two different unrelated >> e-mail accounts. >> >> I still have no clue what was going on... > > Sometimes a post of mine will not show up

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread Chris Green via Python-list
Grant Edwards wrote: > On 2024-02-16, Chris Green via Python-list wrote: > > > I'm looking for a simple way to make NaN values output as something > > like '-' or even just a space instead of the string 'nan'. > > It would probably help if you told us how you're "outputting" them now > (the

Re: Can one output something other than 'nan' for not a number values?

2024-02-19 Thread Chris Green via Python-list
dn wrote: > On 18/02/24 09:53, Grant Edwards via Python-list wrote: > > On 2024-02-17, Cameron Simpson via Python-list > > wrote: > >> On 16Feb2024 22:12, Chris Green wrote: > >>> I'm looking for a simple way to make NaN values output as something > >>> like '-' or even just a space instead of

Re: Testing (sorry)

2024-02-19 Thread Byunghee HWANG via Python-list
Hellow Grant, On Sat, 2024-02-17 at 18:54 -0600, Grant Edwards via Python-list wrote: > > Today I noticed that nothing I've posted to python-list in past 3 > weeks has shown up on the list. I don't know how to troubleshoot this > other than sending test messages.  Obviously, if this shows up on

Re: Matplotlib warning [error?] message

2024-02-19 Thread Zahraa Fadhil via Python-list
On Sunday, February 18, 2024 at 10:48:29 PM UTC+3, Leif Svalgaard wrote: > The latest[?] version of Matplotlib cannot show a figure. I get the > annoying error message: "Matplotlib is currently using agg, which is a > non-GUI backend, so cannot show the figure" > I'm using Spyder python 3.11 on

Re: Testing (sorry)

2024-02-18 Thread Thomas Passin via Python-list
On 2/18/2024 6:09 PM, Grant Edwards via Python-list wrote: On 2024-02-18, Peter J. Holzer via Python-list wrote: [Replying to the list *and* Grant] On 2024-02-17 19:38:04 -0500, Grant Edwards via Python-list wrote: Today I noticed that nothing I've posted to python-list in past 3 weeks has

Re: Testing (sorry)

2024-02-18 Thread Skip Montanaro via Python-list
I can't explain the delays, but will note that the gate-news program on the server runs every 5 minutes via cron. There are multiple moving parts in the overall system. You'll probably get a more useful answer from postmas...@python.org. Skip --

Re: Testing (sorry)

2024-02-18 Thread dn via Python-list
On 19/02/24 12:09, Grant Edwards via Python-list wrote: ... But posts to the list still seemed to vanish into the ether while emails from both accounts reached other destinations without delay, During this process a number of posts from other users did appear in the list archive and at at

Re: Testing (sorry)

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-18, Peter J. Holzer via Python-list wrote: > [Replying to the list *and* Grant] > > On 2024-02-17 19:38:04 -0500, Grant Edwards via Python-list wrote: >> Today I noticed that nothing I've posted to python-list in past 3 >> weeks has shown up on the list. > > January 29th, AFAICS. And

Re: Testing (sorry)

2024-02-18 Thread Alex Kaye via Python-list
We see you Peter AK On Sun, Feb 18, 2024 at 2:41 PM Peter J. Holzer via Python-list < python-list@python.org> wrote: > [Replying to the list *and* Grant] > > On 2024-02-17 19:38:04 -0500, Grant Edwards via Python-list wrote: > > Today I noticed that nothing I've posted to python-list in past 3

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread dn via Python-list
On 18/02/24 09:53, Grant Edwards via Python-list wrote: On 2024-02-17, Cameron Simpson via Python-list wrote: On 16Feb2024 22:12, Chris Green wrote: I'm looking for a simple way to make NaN values output as something like '-' or even just a space instead of the string 'nan'. [...]

Re: Testing (sorry)

2024-02-18 Thread Peter J. Holzer via Python-list
[Replying to the list *and* Grant] On 2024-02-17 19:38:04 -0500, Grant Edwards via Python-list wrote: > Today I noticed that nothing I've posted to python-list in past 3 > weeks has shown up on the list. January 29th, AFAICS. And end of december before that. > I don't know how to troubleshoot

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Chris Angelico via Python-list
On Mon, 19 Feb 2024 at 06:47, Grant Edwards via Python-list wrote: > I would be tempted to try monkey-patching the float class to override > the __format__ method. I have no idea what side effects that might > have, or if it's even used by the various formatting mechanisms, so > you might end up

Matplotlib warning [error?] message

2024-02-18 Thread Leif Svalgaard via Python-list
The latest[?] version of Matplotlib cannot show a figure. I get the annoying error message: "Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure" I'm using Spyder python 3.11 on Windows 11. What to do? -- Leif Svalgaard l...@leif.org --

Re: test-ignore

2024-02-18 Thread Science Researcher via Python-list
"Lawrence D'Oliveiro" wrote in message news:uqrik4$lrc1$1...@dont-email.me... On Sat, 17 Feb 2024 17:00:59 -0600, Science Researcher wrote: "Lawrence D'Oliveiro" wrote in message news:uqmbp3$3hsa6$1...@dont-email.me... If I remember correctly, I had to get the installation program

Re: Can one output something other than 'nan' for not a number values?

2024-02-18 Thread Piergiorgio Sartor via Python-list
On 16/02/2024 23.12, Chris Green wrote: I'm looking for a simple way to make NaN values output as something like '-' or even just a space instead of the string 'nan'. This would then make it much easier to handle outputting values from sensors when not all sensors are present. So, for example,

Proposed Python Computer Program - Feb. 17, 2024

2024-02-18 Thread Science Researcher via Python-list
PROPOSED PYTHON COMPUTER LANGUAGE PROGRAM - Posted on February 17, 2024 TOPICS Some Background Information Test Post Newsgroups Adding Posting Dates To Newsgroup Notes E-mail Address Other Internet Security Steps Personal Opinion Statements SOME BACKGROUND INFORMATION A fair amount of

Python Stampede Time? – Feb. 18, 2024

2024-02-18 Thread Science Researcher via Python-list
"Science Researcher" wrote in message news:z4acnqbo6mkf9kz4nz2dnzfqn_edn...@earthlink.com... PROPOSED PYTHON COMPUTER LANGUAGE PROGRAM - Posted on February 17, 2024 PYTHON STAMPEDE TIME ? – Posted on February 18, 2024 Before discussing this specific topic in detail I am going to

Testing (sorry)

2024-02-18 Thread Grant Edwards via Python-list
Today I noticed that nothing I've posted to python-list in the past 3 weeks has shown up on the list. I don't know how to troubleshoot this other than by sending test messages. Obviously, if this shows up on the list, then I'm making progress... [message 3] -- Grant --

Testing (sorry)

2024-02-18 Thread Grant Edwards via Python-list
Today I noticed that nothing I've posted to python-list in past 3 weeks has shown up on the list. I don't know how to troubleshoot this other than sending test messages. Obviously, if this shows up on the list, then I'm making progress. [message 4] -- Grant --

<    1   2   3   4   5   6   7   8   9   10   >