Re: Tkinter long-running window freezes

2021-02-24 Thread John O'Hagan
On Thu, 25 Feb 2021 00:27:33 + MRAB wrote: > On 2021-02-24 23:23, John O'Hagan wrote: [...] > > In case it's relevant, to clarify what I mean by "freeze": the > > window continues to display the digits indefinitely if no attempt > > is made to interact with the window, but after some hours h

Re: name for a mutually inclusive relationship

2021-02-24 Thread Chris Angelico
On Thu, Feb 25, 2021 at 4:06 PM Avi Gross via Python-list wrote: > > Is there a more general idea here? How about asking for a control that > internally manages N items and requires exactly M of them before the entry > is accepted when you click? The case being discussed sort of wants N out of > N

Re: name for a mutually inclusive relationship

2021-02-24 Thread Frank Millman
On 2021-02-24 6:12 PM, Ethan Furman wrote: I'm looking for a name for a group of options that, when one is specified, all of them must be specified. For contrast, - radio buttons: a group of options where only one can be specified (mutually exclusive) - check boxes:   a group of options that

RE: name for a mutually inclusive relationship

2021-02-24 Thread Avi Gross via Python-list
Is there a more general idea here? How about asking for a control that internally manages N items and requires exactly M of them before the entry is accepted when you click? The case being discussed sort of wants N out of N, or nothing. Example, you order a family dinner from a Restaurant and are

Re: comparing two lists

2021-02-24 Thread MRAB
On 2021-02-25 00:42, Davor Levicki wrote: i have two lists list1 = ['01:15', 'abc', '01:15', 'def', '01:45', 'ghi' ] list2 = ['01:15', 'abc', '01:15', 'uvz', '01:45', 'ghi' ] and when I loop through the list list_difference = [] for item in list1: if item not in list2: list_differen

Re: comparing two lists

2021-02-24 Thread Larry Martell
On Wed, Feb 24, 2021 at 4:45 PM Davor Levicki wrote: > > i have two lists > > list1 = ['01:15', 'abc', '01:15', 'def', '01:45', 'ghi' ] > list2 = ['01:15', 'abc', '01:15', 'uvz', '01:45', 'ghi' ] > > and when I loop through the list > > > list_difference = [] > for item in list1: > > if item no

Re: Tkinter new window contentent when button is clicked.

2021-02-24 Thread MRAB
On 2021-02-24 21:57, Bischoop wrote: I'm learning Tkinter now and have upgraded few programs I've made in CLI in the past. What is bothering me now is what I should look at when I want new content in a window when button is 'Next' is clicked. In some programs we're clicking button next and new c

comparing two lists

2021-02-24 Thread Davor Levicki
i have two lists list1 = ['01:15', 'abc', '01:15', 'def', '01:45', 'ghi' ] list2 = ['01:15', 'abc', '01:15', 'uvz', '01:45', 'ghi' ] and when I loop through the list list_difference = [] for item in list1: if item not in list2: list_difference.append(item) and I managed to get the di

Re: Tkinter long-running window freezes

2021-02-24 Thread MRAB
On 2021-02-24 23:23, John O'Hagan wrote: On Wed, 24 Feb 2021 13:07:24 + MRAB wrote: On 2021-02-24 11:35, John O'Hagan wrote: [...] > > Here is some minimal, non-threaded code that reproduces the problem > on my system (Xfce4 on Debian testing): > > from tkinter import * > from random

Re: Tkinter long-running window freezes

2021-02-24 Thread John O'Hagan
On Wed, 24 Feb 2021 11:03:30 -0500 Terry Reedy wrote: > On 2/24/2021 6:35 AM, John O'Hagan wrote: [...] > > I am trying this out on Windows 10, with a wider label (so I can move > the window) and a button that changes when pressed, and a sequential > counter. Will report when the Window freez

Re: name for a mutually inclusive relationship

2021-02-24 Thread Tim Chase
On 2021-02-24 08:12, Ethan Furman wrote: > I'm looking for a name for a group of options that, when one is > specified, all of them must be specified. [snip] > - ???: a group of options where, if one is specified, all must be > specified (mutually inclusive) [snip] > Is there a name out there alrea

Re: Tkinter long-running window freezes

2021-02-24 Thread John O'Hagan
On Wed, 24 Feb 2021 13:07:24 + MRAB wrote: > On 2021-02-24 11:35, John O'Hagan wrote: [...] > > > > Here is some minimal, non-threaded code that reproduces the problem > > on my system (Xfce4 on Debian testing): > > > > from tkinter import * > > from random import randint > > > > root = Tk

Re: Tkinter new window contentent when button is clicked.

2021-02-24 Thread Bischoop
On 2021-02-24, Bischoop wrote: > Just came to solution, I learnt that the combobox can be bind and call function when combobox value changes. -- Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: name for a mutually inclusive relationship

2021-02-24 Thread Ethan Furman
On 2/24/21 1:54 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: Ethan Furman wrote: I didn't say it was a good example. ;-) Hopefully it gets the idea across. Ditto. ;-) IMO, the whole idea of "my program has two options, and the user has to specify both or neither," isn't a question of wh

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
On 24/02/2021 20:21, Chris Angelico wrote: On Thu, Feb 25, 2021 at 6:14 AM lucas wrote: I tested from the windows computer (Python 3.8, it appears, not 3.7 as i thought), and got the following nginx log: [LAPTOP IP] - - [24/Feb/2021:20:06:42 +0100] "POST /lib/exe/xmlrpc.php?u=[user]&p=[passwor

Tkinter new window contentent when button is clicked.

2021-02-24 Thread Bischoop
I'm learning Tkinter now and have upgraded few programs I've made in CLI in the past. What is bothering me now is what I should look at when I want new content in a window when button is 'Next' is clicked. In some programs we're clicking button next and new content appears in same window. I've u

Re: name for a mutually inclusive relationship

2021-02-24 Thread 2QdxY4RzWzUUiLuE
On 2021-02-24 at 13:31:42 -0800, Ethan Furman wrote: > On 2/24/21 1:23 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: > > > > entangled (none or all): > > > > > > image size override: height width > > > > IMO, that's *one* option (-s 640x480 or -s 640,480), not two. In > > argparse/optp

Re: name for a mutually inclusive relationship

2021-02-24 Thread Ethan Furman
On 2/24/21 1:23 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: entangled (none or all): image size override: height width IMO, that's *one* option (-s 640x480 or -s 640,480), not two. In argparse/optparse terms, a required argument with a custom type. (OTOH, in a GUI, it'd be two sepa

Re: name for a mutually inclusive relationship

2021-02-24 Thread 2QdxY4RzWzUUiLuE
On 2021-02-24 at 13:05:05 -0800, Ethan Furman wrote: > entangled (none or all): > >image size override: height width IMO, that's *one* option (-s 640x480 or -s 640,480), not two. In argparse/optparse terms, a required argument with a custom type. (OTOH, in a GUI, it'd be two separate m

Re: Bug report

2021-02-24 Thread Peter Otten
On 24/02/2021 22:03, Dan Stromberg wrote: On Wed, Feb 24, 2021 at 12:58 PM Peter Otten <__pete...@web.de> wrote: On 24/02/2021 20:36, Carla Molina wrote: This is not a bug. Have a look at the array's dtype: >>> n = 60461826 >>> a = np.array([1, 50, 100, 150, 200, 250, 300]) >>> a.dtype d

Re: name for a mutually inclusive relationship

2021-02-24 Thread Ethan Furman
On 2/24/21 12:40 PM, Alan Gauld via Python-list wrote: On 24/02/2021 16:12, Ethan Furman wrote: I'm looking for a name for a group of options that, when one is specified, all of them must be specified. For contrast, - radio buttons: a group of options where only one can be specified (mutually

Re: Bug report

2021-02-24 Thread Dan Stromberg
On Wed, Feb 24, 2021 at 12:58 PM Peter Otten <__pete...@web.de> wrote: > On 24/02/2021 20:36, Carla Molina wrote: > This is not a bug. Have a look at the array's dtype: > > >>> n = 60461826 > >>> a = np.array([1, 50, 100, 150, 200, 250, 300]) > >>> a.dtype > dtype('int32') > I'm getting dtypes

Re: Bug report

2021-02-24 Thread Dan Stromberg
I'm getting: /usr/local/cpython-2.7/bin/python (2.7.16) bad ('numpy version:', '1.16.6') Traceback (most recent call last): File "./nii", line 31, in assert left == right, "{} != {}".format(left, right) AssertionError: 86374.0371429 != 86374.0371429 /usr/local/cpython-3.0

Re: Bug report

2021-02-24 Thread Peter Otten
On 24/02/2021 20:36, Carla Molina wrote: I found the following bug (python 3.9.1) when multiplying an array by several variables without parentheses; look at the following example: import numpy as np NR = 0.25 N = 60461826 initialINCIDENCE = np.array([1, 50, 100, 150, 200, 250, 300]) initialIN

Re: name for a mutually inclusive relationship

2021-02-24 Thread Ethan Furman
On 2/24/21 8:28 AM, 2qdxy4rzwzuui...@potatochowder.com wrote: Entangled? Hey, I like that one! ;-) -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: name for a mutually inclusive relationship

2021-02-24 Thread Alan Gauld via Python-list
On 24/02/2021 16:12, Ethan Furman wrote: > I'm looking for a name for a group of options that, when one is specified, > all of them must be specified. > > For contrast, > > - radio buttons: a group of options where only one can be specified (mutually > exclusive) > - check boxes: a group of o

Bug report

2021-02-24 Thread Carla Molina
I found the following bug (python 3.9.1) when multiplying an array by several variables without parentheses; look at the following example: import numpy as np NR = 0.25 N = 60461826 initialINCIDENCE = np.array([1, 50, 100, 150, 200, 250, 300]) initialINCIDENCE = initialINCIDENCE*N/(10*7*NR)

Re: use set notation for repr of dict_keys?

2021-02-24 Thread Marco Sulla
On Wed, 24 Feb 2021 at 15:02, Random832 wrote: > On Wed, Feb 24, 2021, at 02:59, Marco Sulla wrote: > > On Wed, 24 Feb 2021 at 06:29, Random832 wrote: > > > I was surprised, though, to find that you can't remove items directly > > > from the key set, or in general update it in place with &= or -

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread Chris Angelico
On Thu, Feb 25, 2021 at 6:14 AM lucas wrote: > I tested from the windows computer (Python 3.8, it appears, not 3.7 as i > thought), and got the following nginx log: > > [LAPTOP IP] - - [24/Feb/2021:20:06:42 +0100] "POST > /lib/exe/xmlrpc.php?u=[user]&p=[password] HTTP/1.1" 200 209 "-" > "DokuWikiX

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
On 24/02/2021 19:22, Chris Angelico wrote: On Thu, Feb 25, 2021 at 5:12 AM lucas wrote: On 24/02/2021 18:48, Chris Angelico wrote: I added socket.gethostbyname("wiki.example.net") (i removed the https:// since it, obviously now i think about it, led to a socket error) in the program, so i coul

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread Chris Angelico
On Thu, Feb 25, 2021 at 5:12 AM lucas wrote: > > On 24/02/2021 18:48, Chris Angelico wrote: > I added socket.gethostbyname("wiki.example.net") (i removed the https:// > since it, obviously now i think about it, led to a socket error) > in the program, so i could verify both the URL and IP are equi

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
On 24/02/2021 18:48, Chris Angelico wrote: On Thu, Feb 25, 2021 at 4:36 AM lucas wrote: A properly-formed URL will start with a protocol. I don't know specifically what changed, but it's looking like something started rejecting malformed URLs. Try adding "http://"; or "https://"; to your URL (w

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread Chris Angelico
On Thu, Feb 25, 2021 at 4:36 AM lucas wrote: > > A properly-formed URL will start with a protocol. I don't know > > specifically what changed, but it's looking like something started > > rejecting malformed URLs. Try adding "http://"; or "https://"; to your > > URL (whichever is appropriate) and s

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
On 24/02/2021 18:00, Chris Angelico wrote: On Thu, Feb 25, 2021 at 2:02 AM lucas wrote: Hi everyone, (Sorry for the double-send if any, i'm not sure the first send was performed, maybe because of bounce errors according to mailman.) I'm currently trying to understand an error when using the

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread Chris Angelico
On Thu, Feb 25, 2021 at 2:02 AM lucas wrote: > > Hi everyone, > > (Sorry for the double-send if any, i'm not sure the first send was > performed, maybe because of bounce errors according to mailman.) > > > I'm currently trying to understand an error when using the > dokuwikixmlrpc python module, a

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
Hi, thanks for your answer ! I updated everything, including certificates, while upgrading to python 3.9, and retried today (no new certificates to install). I am the administrator of the wiki i try to access, and didn't do black magic in the configuration.. The error really seems to came fr

Re: name for a mutually inclusive relationship

2021-02-24 Thread lucas
Hi ! In case you didn't though about that, in argparse, MutuallyExclusiveGroup is used for the mutually exclusive logic. You may use the same nomenclature, which happens to be IMHO much clearer than the one you came up with. In GUIs, i guess that such an option would be implemented by a chec

Re: name for a mutually inclusive relationship

2021-02-24 Thread 2QdxY4RzWzUUiLuE
On 2021-02-24 at 08:12:58 -0800, Ethan Furman wrote: > I'm looking for a name for a group of options that, when one is specified, > all of them must be specified. > > For contrast, > > - radio buttons: a group of options where only one can be specified (mutually > exclusive) > - check boxes:

Re: Tkinter long-running window freezes

2021-02-24 Thread Terry Reedy
On 2/24/2021 6:35 AM, John O'Hagan wrote: Hi list I have a 3.9 tkinter interface that displays data from an arbitrary number of threads, each of which runs for an arbitrary period of time. A frame opens in the root window when each thread starts and closes when it stops. Widgets in the frame and

Re: Idle Python issue

2021-02-24 Thread Terry Reedy
On 2/24/2021 5:32 AM, jak wrote: Hello everybody, I encounter a problem using Idle Python in Windows when I use utf8 characters longer than 2 bytes such as the character representing the smile emoticon: The problem is with 'astral' unicode characters, those not in the Basic Multilingual Plan

name for a mutually inclusive relationship

2021-02-24 Thread Ethan Furman
I'm looking for a name for a group of options that, when one is specified, all of them must be specified. For contrast, - radio buttons: a group of options where only one can be specified (mutually exclusive) - check boxes: a group of options that are independent of each other (any number o

Re: python 2.6: Need some advise for installing modules on a legacy system

2021-02-24 Thread Dan Stromberg
You also could try getting the modules (of suitable versions) you need from their homepage, possibly github, and then use the setup.py to install your packages. pypi usually has a link to a project's homepage. On Wed, Feb 24, 2021 at 6:08 AM Dan Stromberg wrote: > > I don't think pip supports 2

Re: XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread 2QdxY4RzWzUUiLuE
On 2021-02-24 at 15:29:58 +0100, lucas wrote: > I'm currently trying to understand an error when using the dokuwikixmlrpc > python module, allowing to easily work with DokuWiki RPC interface. > > Another description of the problem : > https://github.com/kynan/dokuwikixmlrpc/issues/8 > > H

XML RPC changes between 3.7 and 3.9 yield 401 http error

2021-02-24 Thread lucas
Hi everyone, (Sorry for the double-send if any, i'm not sure the first send was performed, maybe because of bounce errors according to mailman.) I'm currently trying to understand an error when using the dokuwikixmlrpc python module, allowing to easily work with DokuWiki RPC interface. An

Re: Pip standard error warning about dependency resolver

2021-02-24 Thread Lars Liedtke
I understand your problem and I know that sometimes it is not possible to do it differently. But as far as my understanding goes, your backend operations should not die on outputs on stderr. I understand that is what return values are for and as long as the return value is 0 everything went without

Re: python 2.6: Need some advise for installing modules on a legacy system

2021-02-24 Thread Dan Stromberg
I don't think pip supports 2.x anymore. You might be able to: 1) Look up what versions of your desired modules support Python 2.x on pypi's website 2) Install them on another system that has Python 3.x using pip 3) Copy them to the moribund system 4) Test On Wed, Feb 24, 2021 at 5:15 AM Antoon P

Re: use set notation for repr of dict_keys?

2021-02-24 Thread Random832
On Wed, Feb 24, 2021, at 02:59, Marco Sulla wrote: > On Wed, 24 Feb 2021 at 06:29, Random832 wrote: > > I was surprised, though, to find that you can't remove items directly from > > the key set, or in general update it in place with &= or -= (these > > operators work, but give a new set object)

python 2.6: Need some advise for installing modules on a legacy system

2021-02-24 Thread Antoon Pardon
I need to do some development on this legacy system. It only runs python2.6 and there is little hope of installing an other version. How can I best proceed to install modules for working with mysql and ldap? -- Antoon. -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter long-running window freezes

2021-02-24 Thread MRAB
On 2021-02-24 11:35, John O'Hagan wrote: Hi list I have a 3.9 tkinter interface that displays data from an arbitrary number of threads, each of which runs for an arbitrary period of time. A frame opens in the root window when each thread starts and closes when it stops. Widgets in the frame and

Tkinter long-running window freezes

2021-02-24 Thread John O'Hagan
Hi list I have a 3.9 tkinter interface that displays data from an arbitrary number of threads, each of which runs for an arbitrary period of time. A frame opens in the root window when each thread starts and closes when it stops. Widgets in the frame and the root window control the thread and how

Idle Python issue

2021-02-24 Thread jak
Hello everybody, I encounter a problem using Idle Python in Windows when I use utf8 characters longer than 2 bytes such as the character representing the smile emoticon: :-) that is this: 😊 Try to write this in Idle: "😊".encode('utf8') b'\xf0\x9f\x98\x8a' now try to write this: "".encode('utf8'

Re: use set notation for repr of dict_keys?

2021-02-24 Thread Marco Sulla
On Wed, 24 Feb 2021 at 06:29, Random832 wrote: > I was surprised, though, to find that you can't remove items directly from > the key set, or in general update it in place with &= or -= (these operators > work, but give a new set object). This is because they are a view. Changing the key object