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

Testing - 2 (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've gotten it to work... -- 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've gotten it to work... -- Grant --

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

2024-02-18 Thread Grant Edwards via Python-list
On 2024-02-16, 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'. I tried monkey-patching the __format__ method of float, but it's immutable, so that didnt' work. Is float.__format__ what's used

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

2024-02-18 Thread Grant Edwards via Python-list
[I've been trying all afternoon to post via slrn, but nothing is showing up on the list. Forgive me if multiple posts eventually show up.] 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

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

2024-02-18 Thread Grant Edwards via Python-list
[Posts via slrn and my GMail account aren't showing up, so I guess I'll try subscribing from a different e-mail address.] 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-18 Thread Grant Edwards via Python-list
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'. [...] >> >>Battery Voltages and Currents >>Leisure Battery -

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

2024-02-18 Thread Grant Edwards via Python-list
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'. [...] >> >>Battery Voltages and Currents >>Leisure Battery -

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

2024-02-18 Thread Grant Edwards via Python-list
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'. [...] >> >>Battery Voltages and Currents >>Leisure Battery -

Yes - But it had to be specially installed - Feb. 17, 2024

2024-02-18 Thread Science Researcher via Python-list
"Lawrence D'Oliveiro" wrote in message news:uqmbp3$3hsa6$1...@dont-email.me... On Thu, 15 Feb 2024 15:15:58 -0600, E.D.G. wrote: X-Newsreader: Microsoft Windows Live Mail 15.4.3508.1109 Does that still exist? "Microsoft Windows Live Mail" did still exist when I installed it

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

2024-02-18 Thread Grant Edwards via Python-list
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'. >>[...] >> >>Battery Voltages and Currents >>Leisure Battery -

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

2024-02-18 Thread Grant Edwards via Python-list
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 Python feaatures/functions used, not

Re: Using __new__

2024-02-18 Thread Mats Wichmann via Python-list
On 2/17/24 19:24, dn via Python-list wrote: On 18/02/24 13:21, Jonathan Gossage wrote: - perhaps someone knows a better/proper way to do this? Suggested research: custom classes, ABCs, and meta-classes... Cure the old "what do you want to accomplish" question. If it's to channel access

Re: Using __new__

2024-02-17 Thread dn via Python-list
On 18/02/24 13:21, Jonathan Gossage wrote: The problem is that if you are dealing with a library class, you may have times when the superclass is 'object' while at other times, with a different inheritance hierarchy, the superclass may need arguments. My thought is that the object class

Re: Using __new__

2024-02-17 Thread dn via Python-list
On 18/02/24 12:48, Jonathan Gossage wrote: The problem that I am facing is that when the superclass is not 'object', the __init__ method may well need arguments. I do not know how to determine if the superclass is 'object'. For what it is worth, any attempt to use this with different arguments 

Re: Using __new__

2024-02-17 Thread dn via Python-list
On 18/02/24 11:35, Jonathan Gossage via Python-list wrote: I am attempting to use the __new__ method in the following code: class SingletonExample(object): _instance = None def __new__(cls, **kwargs): if cls._instance is None: cls._instance =

Re: Using __new__

2024-02-17 Thread MRAB via Python-list
On 2024-02-17 22:35, Jonathan Gossage via Python-list wrote: I am attempting to use the __new__ method in the following code: class SingletonExample(object): _instance = None def __new__(cls, **kwargs): if cls._instance is None: cls._instance =

Using __new__

2024-02-17 Thread Jonathan Gossage via Python-list
I am attempting to use the __new__ method in the following code: class SingletonExample(object): _instance = None def __new__(cls, **kwargs): if cls._instance is None: cls._instance = super().__new__(cls, **kwargs) return cls._instance def __init__(self,

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

2024-02-16 Thread Cameron Simpson via Python-list
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'. This would then make it much easier to handle outputting values from sensors when not all sensors are present. So, for example,

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

2024-02-16 Thread Chris Green via Python-list
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, my battery monitoring program outputs:-

Re: A question about import

2024-02-16 Thread Cameron Simpson via Python-list
On 16Feb2024 20:32, MRAB wrote: On 2024-02-16 20:07, Gabor Urban via Python-list wrote: I need something about modules to be clarified. Suppose I have written a module eg: ModuleA which imports an other module, let us say the datetime. If I import ModuleA in a script, will be datetime

Re: A question about import

2024-02-16 Thread MRAB via Python-list
On 2024-02-16 20:07, Gabor Urban via Python-list wrote: Hi guys, I need something about modules to be clarified. Suppose I have written a module eg: ModuleA which imports an other module, let us say the datetime. If I import ModuleA in a script, will be datetime imported automatically? Yes.

A question about import

2024-02-16 Thread Gabor Urban via Python-list
Hi guys, I need something about modules to be clarified. Suppose I have written a module eg: ModuleA which imports an other module, let us say the datetime. If I import ModuleA in a script, will be datetime imported automatically? Thanks in advance, -- Urbán Gábor Linux is like a wigwam: no

Re: test-ignore

2024-02-16 Thread Grizzy Adams via Python-list
Thursday, February 15, 2024 at 16:02, Tony Oliver via Python-list wrote: Re: test-ignore (at least in part) >On Thursday 15 February 2024 at 21:16:22 UTC, E.D.G. wrote: >> Test - ignore February 15, 2024 >> >> Test post to see if my Newsgroup post program is working. > >Aim your test messages

Re: test-ignore

2024-02-15 Thread Skip Montanaro via Python-list
> > True, but did the poster really need to send another one to say "yes, > that worked"? > Maybe to test the bidirectionality of the gateway? 路 If the messages stop I think we can let it die. It's not like this sort of activity is a regular occurrence. (A bigger problem for me was always Usenet

Re: test-ignore

2024-02-15 Thread MRAB via Python-list
On 2024-02-16 00:29, Skip Montanaro via Python-list wrote: > Test post to see if my Newsgroup post program is working. Aim your test messages at alt.test, please. I agree that basic Usenet connectivity messages should go to alt.test. It's not clear from the original post, but if the

Re: test-ignore

2024-02-15 Thread dn via Python-list
On 16/02/24 13:29, Skip Montanaro via Python-list wrote: Test post to see if my Newsgroup post program is working. Aim your test messages at alt.test, please. I agree that basic Usenet connectivity messages should go to alt.test. It's not clear from the original post, but if the poster's

Re: test-ignore

2024-02-15 Thread Skip Montanaro via Python-list
> > > Test post to see if my Newsgroup post program is working. > > Aim your test messages at alt.test, please. > I agree that basic Usenet connectivity messages should go to alt.test. It's not clear from the original post, but if the poster's aim was to see if posts to comp.lang.python traverse

Re: test-ignore

2024-02-15 Thread Tony Oliver via Python-list
On Thursday 15 February 2024 at 21:16:22 UTC, E.D.G. wrote: > Test - ignore February 15, 2024 > > Test post to see if my Newsgroup post program is working. Aim your test messages at alt.test, please. -- https://mail.python.org/mailman/listinfo/python-list

test ignore

2024-02-15 Thread Science Researcher via Python-list
This is a test message - just ignore it -- https://mail.python.org/mailman/listinfo/python-list

Re: test ignore

2024-02-15 Thread Science Researcher via Python-list
"Science Researcher" wrote in message news:fh2dnwrca5oedvp4nz2dnzfqnpwdn...@earthlink.com... This is a test message - just ignore it That post worked as intended. -- https://mail.python.org/mailman/listinfo/python-list

test-ignore

2024-02-15 Thread E.D.G. via Python-list
Test - ignore February 15, 2024 Test post to see if my Newsgroup post program is working. -- https://mail.python.org/mailman/listinfo/python-list

[RELEASE] Python 3.13.0a4 is now available

2024-02-15 Thread Thomas Wouters via Python-list
It’s time for Python 3.13.0 alpha 4 (now with SPDX SBOM OMG!): https://www.python.org/downloads/release/python-3130a4/ *This is an early developer preview of Python 3.13* Major new

pytest-logger 1.0.0 released

2024-02-11 Thread Krzysztof Laskowski via Python-list
Hi All, pytest-logger is pytest plugin for putting stdlib logging logs to files or terminal: pypi: https://pypi.python.org/pypi/pytest-logger/1.0.0 repo: https://github.com/aurzenligl/pytest-logger docs: http://pytest-logger.readthedocs.io Best Regards, Krzysztof Laskowski --

Re: Is there a way to implement the ** operator on a custom object

2024-02-09 Thread Cameron Simpson via Python-list
On 09Feb2024 18:56, Left Right wrote: But, more to the point: extending collections.abc.Mapping may or may not be possible in OP's case. We don't yet know if that's what the OP had in mind yet, anyway. Also, if you are doing this through inheritance, this seems really convoluted: why not

Re: Is there a way to implement the ** operator on a custom object

2024-02-09 Thread Left Right via Python-list
> Looks like it can simply be done in Python, no tp_as_mapping needed. It's not that it isn't needed. You've just shown a way to add it using Python code. But, more to the point: extending collections.abc.Mapping may or may not be possible in OP's case. Also, if you are doing this through

Re: Is there a way to implement the ** operator on a custom object

2024-02-09 Thread Roel Schroeven via Python-list
Left Right via Python-list schreef op 9/02/2024 om 17:09: In order for the "splat" operator to work, the type of the object must populate slot `tp_as_mapping` with a struct of this type: https://docs.python.org/3/c-api/typeobj.html#c.PyMappingMethods and have some non-null implementations of the

Re: Is there a way to implement the ** operator on a custom object

2024-02-09 Thread Left Right via Python-list
In order for the "splat" operator to work, the type of the object must populate slot `tp_as_mapping` with a struct of this type: https://docs.python.org/3/c-api/typeobj.html#c.PyMappingMethods and have some non-null implementations of the methods this struct is supposed to contain. I can do this

Re: Is there a way to implement the ** operator on a custom object

2024-02-09 Thread Alan Bawden via Python-list
Chris Angelico writes: > On 08Feb2024 12:21, tony.fl...@btinternet.com wrote: > >I know that mappings by default support the ** operator, to unpack the > >mapping into key word arguments. > > > >Has it been considered implementing a dunder method for the ** > >operator so you

Re: Is there a way to implement the ** operator on a custom object

2024-02-08 Thread Chris Angelico via Python-list
On Fri, 9 Feb 2024 at 17:03, Cameron Simpson via Python-list wrote: > > On 08Feb2024 12:21, tony.fl...@btinternet.com > wrote: > >I know that mappings by default support the ** operator, to unpack the > >mapping into key word arguments. > > > >Has it been considered implementing a dunder method

Re: Is there a way to implement the ** operator on a custom object

2024-02-08 Thread Cameron Simpson via Python-list
On 08Feb2024 12:21, tony.fl...@btinternet.com wrote: I know that mappings by default support the ** operator, to unpack the mapping into key word arguments. Has it been considered implementing a dunder method for the ** operator so you could unpack an object into a key word argument, and

Is there a way to implement the ** operator on a custom object

2024-02-08 Thread Tony Flury via Python-list
I know that mappings by default support the ** operator, to unpack the mapping into key word arguments. Has it been considered implementing a dunder method for the ** operator so you could unpack an object into a key word argument, and the developer could choose which keywords would be

Re: Python misbehavior

2024-02-08 Thread Richard Damon via Python-list
On 2/6/24 10:46 PM, Jim via Python-list wrote: Friends, Please forgive me if this is not the proper forum for dealing with an issue of mine, but I am at a loss in finding a fix for a python problem in the program ClipGrab. The program allows one to download videos or audios from YouTube and

Python misbehavior

2024-02-07 Thread Jim via Python-list
Friends, Please forgive me if this is not the proper forum for dealing with an issue of mine, but I am at a loss in finding a fix for a python problem in the program ClipGrab. The program allows one to download videos or audios from YouTube and other media sites. My limited understanding of the

[RELEASE] Python 3.12.2 and 3.11.8 now available.

2024-02-07 Thread Thomas Wouters via Python-list
*Python 3.12.2 and 3.11.8 are here! *In addition to all the usual bugfixes, these releases contain a small security fix: hidden .pth files are no longer automatically read and executed as part of Python startup. (New

Re: Extract lines from file, add to new files

2024-02-04 Thread dn via Python-list
On 4/02/24 13:20, avi.e.gr...@gmail.com wrote: Dave, You and I have had some experience in teaching or tutoring others and I think it fair to say our motivation is closer to teaching someone how they can fish for themselves rather than just handing them a fully-cooked fish. Which may push

PyDev 12.0.0 Released

2024-02-04 Thread Fabio Zadrozny via Python-list
PyDev 12.0.0 Release Highlights - *Debugger* - *sys.monitoring* is now used in Python 3.12 (and it's *much* faster than any previous version). - A new setting was added in the *Preferences > PyDev > Debug* to debug *just my code* (meaning that when stepping it will

Re: Error pd.set_option('display.width', 10000)

2024-02-03 Thread MRAB via Python-list
On 2024-02-03 23:02, gelukt gelukt via Python-list wrote: Dear, While running a code, I get the error below: What does this error mean? How can I fix this error? C:\Users\brech\Desktop\Crypto\venv\Scripts\python.exe "C:/Users/brech/Desktop/Crypto/Project/aaa Arbitrage.py" Traceback (most

Error pd.set_option('display.width', 10000)

2024-02-03 Thread gelukt gelukt via Python-list
Dear, While running a code, I get the error below: What does this error mean? How can I fix this error? C:\Users\brech\Desktop\Crypto\venv\Scripts\python.exe "C:/Users/brech/Desktop/Crypto/Project/aaa Arbitrage.py" Traceback (most recent call last): File

Re: Await expressions (Posting On Python-List Prohibited)

2024-02-03 Thread Mild Shock via Python-list
Funny source code tells me IOCP is used; proactor is only implemented on Windows with IOCP. https://github.com/python/cpython/blob/3.12/Lib/asyncio/proactor_events.py But maybe the focus is more on networking than file system. But it has sock_sendfile() that might avoid copying data to

Re: Await expressions (Posting On Python-List Prohibited)

2024-02-03 Thread Mild Shock via Python-list
The docu tells me: Windows loop.add_reader() and loop.add_writer() only accept socket handles (e.g. pipe file descriptors are not supported). https://docs.python.org/3/library/asyncio-platforms.html Alternatives are aiofiles and anyio and maybe more, but not sure whether they span all

Re: Await expressions (Posting On Python-List Prohibited)

2024-02-03 Thread Mild Shock via Python-list
And whats the roadmap for an asyncified module loader, is this on the radar of Python? Mild Shock schrieb: I am still waiting for async files in the style of nodejs that works on windows and is bundled with the main python distribution. I am not very  fond on doing something like adding

Re: Await expressions (Posting On Python-List Prohibited)

2024-02-03 Thread Mild Shock via Python-list
I am still waiting for async files in the style of nodejs that works on windows and is bundled with the main python distribution. I am not very fond on doing something like adding listeners to a file descriptor, in nodejs async files are based on callbacks not on listeners. Whats the

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
Dave, You and I have had some experience in teaching or tutoring others and I think it fair to say our motivation is closer to teaching someone how they can fish for themselves rather than just handing them a fully-cooked fish. My favorite kinds of questions, thus, include someone who explains

Re: Extract lines from file, add to new files

2024-02-03 Thread Thomas Passin via Python-list
On 2/3/2024 5:02 PM, dn via Python-list wrote: Every trainer, in any field, has to deal with these problems - all the time, and over-and-over. On 4/02/24 06:58, Thomas Passin via Python-list wrote: In my view this whole thread became murky and complicated because the OP did not write down

Re: Extract lines from file, add to new files

2024-02-03 Thread dn via Python-list
Every trainer, in any field, has to deal with these problems - all the time, and over-and-over. On 4/02/24 06:58, Thomas Passin via Python-list wrote: In my view this whole thread became murky and complicated because the OP did not write down the requirements for the program.  Requirements

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
We substantially agree with that, Thomas. In the best of all possible worlds, someone who gets stuck will sit down and try to carefully spell out things in ways like you mention and, incidentally, may often catch the error or figure out how to do it and not even send in a request! LOL! I think a

Re: Extract lines from file, add to new files

2024-02-03 Thread Mats Wichmann via Python-list
On 2/3/24 10:58, Thomas Passin via Python-list wrote: In my view this whole thread became murky and complicated because the OP did not write down the requirements for the program.  Requirements are needed to communicate with other people.  An individual may not need to actually write down the

Re: Extract lines from file, add to new files

2024-02-03 Thread Thomas Passin via Python-list
In my view this whole thread became murky and complicated because the OP did not write down the requirements for the program. Requirements are needed to communicate with other people. An individual may not need to actually write down the requirements - depending on their complexity - but

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
Thomas, I have been thinking about the concept of being stingy with information as this is a fairly common occurrence when people ask for help. They often ask for what they think they want while people like us keep asking why they want that and perhaps offer guidance on how to get closer to what

RE: Extract lines from file, add to new files

2024-02-03 Thread AVI GROSS via Python-list
This discussion has circled back to where it started. It illustrates quite a few points about how many different ways someone can do something as well as doing it using different tools and also about how others may see aspects of mission creep as they look for making it perfect when it need not

Re: Await expressions (Posting On Python-List Prohibited)

2024-02-02 Thread Jon Ribbens via Python-list
On 2024-02-02, Lawrence D'Oliveiro wrote: > On 1 Feb 2024 10:09:10 GMT, Stefan Ram wrote: > >> Heck, even of the respected members of this newsgroup, IIRC, no one >> mentioned "__await__". > > It’s part of the definition of an “awaitable”, if you had looked that up. >

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