Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Jon Ribbens via Python-list
On 2023-11-02, Chris Green wrote: > I have a couple of systems which used to have python2 as well as > python3 but as Ubuntu and Debian verions have moved on they have > finally eliminated all dependencies on python2. > > So they now have only python3 and there is no python execu

Re: Checking if email is valid

2023-11-02 Thread Michael Torrie via Python-list
On 11/2/23 00:42, Simon Connah via Python-list wrote: > Basically I'm writing unit tests and one of them passess in a string > with an invalid email address. I need to be able to check the string > to see if it is a valid email so that the unit test passess. If you truly have mana

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Chris Green via Python-list
s indeed work properly and if it is a reliable and recommended way > of doing things. It is a bit of a minefield isn't it. I try to minimise my use of packages installed using pip for this very reason. Maybe the safest route would simply be to uninstall everything and then re-install it. · -- https://mail.python.org/mailman/listinfo/python-list

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Chris Green via Python-list
ow have only python3 and there is no python executable in > > PATH. > > > > There's still both /usr/bin/pip and /usr/bin/pip3 but they're > > identical so presuably I can now simply use pip and it will be a > > python3 pip. > > > > > >

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Jon Ribbens via Python-list
iminated all dependencies on python2. >> > >> > So they now have only python3 and there is no python executable in >> > PATH. >> > >> > There's still both /usr/bin/pip and /usr/bin/pip3 but they're >> > identical so presuably I can now simp

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Jon Ribbens via Python-list
ay >> of doing things. > > It is a bit of a minefield isn't it. I try to minimise my use of > packages installed using pip for this very reason. Maybe the safest > route would simply be to uninstall everything and then re-install it. That is literally what I do quite often - completely erase the virtual env and then re-create it from scratch - because it seems to be the only / easiest way to upgrade the packages to the latest versions consistent with given dependencies. -- https://mail.python.org/mailman/listinfo/python-list

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Mats Wichmann via Python-list
On 11/2/23 04:58, Chris Green via Python-list wrote: I have a couple of systems which used to have python2 as well as python3 but as Ubuntu and Debian verions have moved on they have finally eliminated all dependencies on python2. So they now have only python3 and there is no python executable

Re: Checking if email is valid

2023-11-02 Thread Mike Dewhirst via Python-list
If i wanted an email verifier I would look at open source frameworks and see how they do it. Django comes to mind.--(Unsigned mail from my phone) Original message From: Michael Torrie via Python-list Date: 3/11/23 07:23 (GMT+10:00) To: [email protected] Subject: Re

Re: Checking if email is valid

2023-11-02 Thread Chris Angelico via Python-list
On Fri, 3 Nov 2023 at 07:17, Jon Ribbens via Python-list wrote: > > On 2023-11-02, Simon Connah wrote: > > Valid as in conforms to the standard. Although having looked at the > > standard that might be more difficult than originally planned. > > Yes. Almost nobody

RE: Checking if email is valid

2023-11-02 Thread AVI GROSS via Python-list
recognize most of them properly? That trained algorithm could be shared and incorporated into your programs either as the only method, or one you use in special cases. -Original Message- From: Python-list On Behalf Of Mike Dewhirst via Python-list Sent: Thursday, November 2, 2023 6:31 PM To

Re: Checking if email is valid

2023-11-02 Thread Chris Angelico via Python-list
On Fri, 3 Nov 2023 at 12:21, AVI GROSS via Python-list wrote: > My guess is that a first test of an email address might be to see if a decent > module of that kind fills out the object to your satisfaction. You can then > perhaps test parts of the object, rather than everything at onc

Re: pip/pip3 confusion and keeping up to date

2023-11-03 Thread Chris Green via Python-list
on they have > >> > finally eliminated all dependencies on python2. > >> > > >> > So they now have only python3 and there is no python executable in > >> > PATH. > >> > > >> > There's still both /usr/bin/pip a

Re: Checking if email is valid

2023-11-03 Thread Jon Ribbens via Python-list
On 2023-11-03, Chris Angelico wrote: > On Fri, 3 Nov 2023 at 12:21, AVI GROSS via Python-list > wrote: >> My guess is that a first test of an email address might be to see if >> a decent module of that kind fills out the object to your >> satisfaction. You can then p

RE: Checking if email is valid

2023-11-03 Thread AVI GROSS via Python-list
E bad addresses. -Original Message- From: Python-list On Behalf Of Chris Angelico via Python-list Sent: Friday, November 3, 2023 1:43 AM To: [email protected] Subject: Re: Checking if email is valid On Fri, 3 Nov 2023 at 12:21, AVI GROSS via Python-list wrote: > My guess is that a fi

Re: pip/pip3 confusion and keeping up to date

2023-11-03 Thread Karsten Hilbert via Python-list
Am Thu, Nov 02, 2023 at 09:35:43PM - schrieb Jon Ribbens via Python-list: Regardless of ... > Because pip barely plays well by itself, let alone with other package > managers at the same time. ... being true ... > > I do only install a few things using pip. > > Are the

Re: pip/pip3 confusion and keeping up to date

2023-11-03 Thread Dieter Maurer via Python-list
release by using this constraint file. -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-03 Thread Grant Edwards via Python-list
On 2023-11-02, Michael Torrie via Python-list wrote: > On 11/2/23 00:42, Simon Connah via Python-list wrote: > >> Valid as in conforms to the standard. Although having looked at the >> standard that might be more difficult than originally planned. > > You'll have to

Re: Checking if email is valid

2023-11-03 Thread Simon Connah via Python-list
> > > On 11/2/23 00:42, Simon Connah via Python-list wrote: > > > Basically I'm writing unit tests and one of them passess in a string > > with an invalid email address. I need to be able to check the string > > to see if it is a valid email so that the

Re: Checking if email is valid

2023-11-03 Thread Thomas Passin via Python-list
On 11/3/2023 6:51 AM, Jon Ribbens via Python-list wrote: On 2023-11-03, Chris Angelico wrote: On Fri, 3 Nov 2023 at 12:21, AVI GROSS via Python-list wrote: My guess is that a first test of an email address might be to see if a decent module of that kind fills out the object to your

Re: Checking if email is valid

2023-11-04 Thread Simon Connah via Python-list
> > On 11/3/2023 6:51 AM, Jon Ribbens via Python-list wrote: > > > On 2023-11-03, Chris Angelico [email protected] wrote: > > > > > On Fri, 3 Nov 2023 at 12:21, AVI GROSS via Python-list > > > [email protected] wrote: > > > > >

Re: Checking if email is valid

2023-11-04 Thread Simon Connah via Python-list
interesting to see what broke when you tried to use an esoteric email address in the wild. Maybe when I'm bored :D. Simon. signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-04 Thread Michael Torrie via Python-list
On 11/4/23 02:51, Simon Connah via Python-list wrote: > Wow. I'm half tempted to make a weird email address to see how many websites > get it wrong. > > Thank you for the link. Nearly all websites seem to reject simple correct email addresses such as [email protected]

Re: pip/pip3 confusion and keeping up to date

2023-11-04 Thread Karsten Hilbert via Python-list
Am Thu, Nov 02, 2023 at 04:07:33PM -0600 schrieb Mats Wichmann via Python-list: > >So they now have only python3 and there is no python executable in > >PATH. > > FWIW, for this you install the little stub package python-is-python3. > Especially if you > want to kee

Re: pip/pip3 confusion and keeping up to date

2023-11-04 Thread Jon Ribbens via Python-list
On 2023-11-03, Karsten Hilbert wrote: > Am Thu, Nov 02, 2023 at 09:35:43PM - schrieb Jon Ribbens via Python-list: > > Regardless of ... > >> Because pip barely plays well by itself, let alone with other package >> managers at the same time. > > ... being true

Re: Checking if email is valid

2023-11-04 Thread Grant Edwards via Python-list
On 2023-11-04, Michael Torrie via Python-list wrote: > On 11/4/23 02:51, Simon Connah via Python-list wrote: > >> Wow. I'm half tempted to make a weird email address to see how many >> websites get it wrong. In my experience, they don't have to be very weird at all

Re: Checking if email is valid

2023-11-05 Thread D'Arcy Cain via Python-list
On 2023-11-05 00:39, Grant Edwards via Python-list wrote: Definitely. Syntactic e-mail address "validation" is one of the most useless and widely broken things on the Interwebs. People who do anything other than require an '@' (and optionally make you enter the same @-con

RE: Checking if email is valid

2023-11-05 Thread AVI GROSS via Python-list
newsletters and much more. Some are inadvertent but the reality is she stopped using that email as it is now mostly full of SPAM as the others ... -Original Message- From: Python-list On Behalf Of Grant Edwards via Python-list Sent: Sunday, November 5, 2023 12:39 AM To: python-list

Re: Checking if email is valid

2023-11-05 Thread gene heskett via Python-list
On 11/5/23 05:32, D'Arcy Cain via Python-list wrote: On 2023-11-05 00:39, Grant Edwards via Python-list wrote: Definitely. Syntactic e-mail address "validation" is one of the most useless and widely broken things on the Interwebs.  People who do anything other than requ

Re: Checking if email is valid

2023-11-05 Thread Grant Edwards via Python-list
On 2023-11-05, D'Arcy Cain via Python-list wrote: > On 2023-11-05 00:39, Grant Edwards via Python-list wrote: >> Definitely. Syntactic e-mail address "validation" is one of the most >> useless and widely broken things on the Interwebs. People who do >> any

Re: Checking if email is valid

2023-11-05 Thread Jon Ribbens via Python-list
On 2023-11-05, D'Arcy Cain wrote: > On 2023-11-05 00:39, Grant Edwards via Python-list wrote: >> Definitely. Syntactic e-mail address "validation" is one of the most >> useless and widely broken things on the Interwebs. People who do >> anything other than req

Re: pip/pip3 confusion and keeping up to date

2023-11-05 Thread Jon Ribbens via Python-list
On 2023-11-03, Karsten Hilbert wrote: > Am Thu, Nov 02, 2023 at 04:07:33PM -0600 schrieb Mats Wichmann via > Python-list: >> >So they now have only python3 and there is no python executable in >> >PATH. >> >> FWIW, for this you install the little stub package

Re: pip/pip3 confusion and keeping up to date

2023-11-05 Thread Jon Ribbens via Python-list
On 2023-11-05, Chris Green wrote: > Jon Ribbens wrote: >> On 2023-11-03, Karsten Hilbert wrote: >> > Am Thu, Nov 02, 2023 at 04:07:33PM -0600 schrieb Mats Wichmann via >> > Python-list: >> >> >So they now have only python3 and there is no python execut

Help

2023-11-05 Thread office officce via Python-list
which python version is better to be used and how to make sure it works on my window 10 because i downloaded it and it never worked so I uninstall to do that again please can you give me the steps on how it will work perfectly from Kenny -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-05 Thread Mats Wichmann via Python-list
On 11/5/23 10:34, Grant Edwards via Python-list wrote: Indeed. There is a tiny but brightly burning kernel of hate in my heart for web sites (and their developers) that refuse to accept credit card numbers entered with spaces _as_they_are_shown_on_the_card_! I've concluded that usin

Re: Checking if email is valid

2023-11-05 Thread Jon Ribbens via Python-list
On 2023-11-05, Grant Edwards wrote: > On 2023-11-05, D'Arcy Cain via Python-list wrote: >> On 2023-11-05 00:39, Grant Edwards via Python-list wrote: >>> Definitely. Syntactic e-mail address "validation" is one of the most >>> useless and widely brok

Re: pip/pip3 confusion and keeping up to date

2023-11-05 Thread Chris Green via Python-list
Jon Ribbens wrote: > On 2023-11-03, Karsten Hilbert wrote: > > Am Thu, Nov 02, 2023 at 04:07:33PM -0600 schrieb Mats Wichmann via > > Python-list: > >> >So they now have only python3 and there is no python executable in > >> >PATH. > >> > &g

Re: pip/pip3 confusion and keeping up to date

2023-11-05 Thread Karsten Hilbert via Python-list
rkflow ? Thanks, Karsten -- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B -- https://mail.python.org/mailman/listinfo/python-list

Re: pip/pip3 confusion and keeping up to date

2023-11-05 Thread Karsten Hilbert via Python-list
Am Fri, Nov 03, 2023 at 01:53:32PM - schrieb Jon Ribbens via Python-list: > >> Are they not available in your system's package manager? > > > > ... this clearly often answers to "no" for applications of > > any complexity. > > > > Is ther

Re: pip/pip3 confusion and keeping up to date

2023-11-05 Thread Karsten Hilbert via Python-list
Am Sun, Nov 05, 2023 at 03:00:41PM + schrieb Chris Green via Python-list: > > * contact every single maintainer of every single one of the packages > > that needs updating and persuade them to update their packages and > > reassure them that you are getting all

Re: pip/pip3 confusion and keeping up to date

2023-11-05 Thread Jon Ribbens via Python-list
On 2023-11-05, Karsten Hilbert wrote: > Am Fri, Nov 03, 2023 at 01:53:32PM - schrieb Jon Ribbens via Python-list: > >> >> Are they not available in your system's package manager? >> > >> > ... this clearly often answers to "no" for applic

Re: Checking if email is valid

2023-11-05 Thread D'Arcy Cain via Python-list
On 2023-11-05 06:48, Jon Ribbens via Python-list wrote: Sometimes I think that these sorts of stupid, wrong, validation are the fault of idiot managers. When it's apostrophes though I'm suspicious that it may be idiot programmers who don't know how to prevent SQL injection attac

Re: pip/pip3 confusion and keeping up to date

2023-11-06 Thread Dieter Maurer via Python-list
roblem: to determine which versions are compatible with the universe of (all the "sources" described) package versions. I know that debian packagers create debian packages from Python distributions not using the approach sketched above and likely they have their reasons. You might want

Re: Checking if email is valid

2023-11-06 Thread Simon Connah via Python-list
hell has a landline these days? And not accepting your mobile number in the landline number field is just when I give up. Or having a landline only field that does not accept mobile phones. Simon. signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-06 Thread Mats Wichmann via Python-list
On 11/6/23 01:57, Simon Connah via Python-list wrote: The thing I truly hate is when you have two telephone number fields. One for landline and one for mobile. I mean who in hell has a landline these days? People who live in places with spotty, or no, mobile coverage. We do exist. -- https

Re: Checking if email is valid

2023-11-06 Thread Jon Ribbens via Python-list
On 2023-11-06, D'Arcy Cain wrote: > On 2023-11-05 06:48, Jon Ribbens via Python-list wrote: >> Sometimes I think that these sorts of stupid, wrong, validation are the >> fault of idiot managers. When it's apostrophes though I'm suspicious >> that it may be idi

Detect naming typos (AttributeError) in function names

2023-11-06 Thread Christian Buhtz via Python-list
Hello, I would like to know how to detect (e.g. via a linter) typos in function names imported from another module. Let's assume this given Python code snippet. import foo foo.baR() The package "foo" do contain a function named "bar()" (all lower case letters).

Re: Checking if email is valid

2023-11-06 Thread Jon Ribbens via Python-list
On 2023-11-06, Mats Wichmann wrote: > On 11/6/23 01:57, Simon Connah via Python-list wrote: >> The thing I truly hate is when you have two telephone number fields. >> One for landline and one for mobile. I mean who in hell has a >> landline these days? > > People who

Re: Detect naming typos (AttributeError) in function names

2023-11-06 Thread Dieter Maurer via Python-list
https://mail.python.org/mailman/listinfo/python-list

Re: Detect naming typos (AttributeError) in function names

2023-11-06 Thread George Fischhof via Python-list
Dieter Maurer via Python-list ezt írta (időpont: 2023. nov. 6., H, 19:13): > [email protected] wrote at 2023-11-6 12:47 +: > >I would like to know how to detect (e.g. via a linter) typos in function > >names imported from another module. > > One option is a test suite (-

Re: Checking if email is valid

2023-11-06 Thread Chris Angelico via Python-list
On Tue, 7 Nov 2023 at 02:05, Jon Ribbens via Python-list wrote: > That was another thing that I used to find ridiculous, but seems to have > improved somewhat in recent years - website error pages that said "please > contact us to let us know about this error". I'm sorry

Re: Checking if email is valid

2023-11-06 Thread Mats Wichmann via Python-list
On 11/6/23 08:23, Jon Ribbens via Python-list wrote: On 2023-11-06, Mats Wichmann wrote: On 11/6/23 01:57, Simon Connah via Python-list wrote: The thing I truly hate is when you have two telephone number fields. One for landline and one for mobile. I mean who in hell has a landline these days

Re: Checking if email is valid

2023-11-06 Thread Chris Angelico via Python-list
On Tue, 7 Nov 2023 at 07:10, Mats Wichmann via Python-list wrote: > Suggests maybe labeling should be something like: > > * Number you want to be called on > * Number for texted security messages, if different > > Never seen that, though :-) > My responses would be: *

Re: pip/pip3 confusion and keeping up to date

2023-11-06 Thread Karsten Hilbert via Python-list
Am Mon, Nov 06, 2023 at 01:17:11AM - schrieb Jon Ribbens via Python-list: > >> >> Are they not available in your system's package manager? > >> > > >> > ... this clearly often answers to "no" for applications of > >> > any

Re: pip/pip3 confusion and keeping up to date

2023-11-06 Thread Karsten Hilbert via Python-list
Am Mon, Nov 06, 2023 at 08:58:00AM +0100 schrieb Dieter Maurer: > I know that debian packagers create debian packages > from Python distributions not using the approach sketched above > and likely they have their reasons. > > You might want to discuss this on an `apt` related mail

Re: pip/pip3 confusion and keeping up to date

2023-11-06 Thread Mats Wichmann via Python-list
On 11/6/23 14:28, Karsten Hilbert via Python-list wrote: I had just hoped someone here might have a handy pointer for how to deal with modules having to be installed from pip for use with an apt-installed python-based application. That just shouldn't happen - such packages are supposed

Re: Help

2023-11-06 Thread Jason Friedman via Python-list
On Sun, Nov 5, 2023 at 1:23 PM office officce via Python-list < [email protected]> wrote: > which python version is better to be used and how to make sure it works on > my window 10 because i downloaded it and it never worked so I uninstall to > do that again please can you gi

Re: pip/pip3 confusion and keeping up to date

2023-11-06 Thread Karsten Hilbert via Python-list
Am Mon, Nov 06, 2023 at 02:43:47PM -0700 schrieb Mats Wichmann via Python-list: > >I had just hoped someone here might have a handy pointer for > >how to deal with modules having to be installed from pip for > >use with an apt-installed python-based application. > > Th

Re: pip/pip3 confusion and keeping up to date

2023-11-06 Thread Thomas Passin via Python-list
On 11/6/2023 5:04 PM, Karsten Hilbert via Python-list wrote: Am Mon, Nov 06, 2023 at 02:43:47PM -0700 schrieb Mats Wichmann via Python-list: I had just hoped someone here might have a handy pointer for how to deal with modules having to be installed from pip for use with an apt-installed

Re: Checking if email is valid

2023-11-06 Thread Greg Ewing via Python-list
umber into the landline field or vice versa and reject it, then it can figure out whether it can text to a given numner or not without you having to tell it! -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-06 Thread Greg Ewing via Python-list
ve what the customer tells you." -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-06 Thread Chris Angelico via Python-list
On Tue, 7 Nov 2023 at 10:11, Greg Ewing via Python-list wrote: > > On 7/11/23 7:45 am, Mats Wichmann wrote: > > Continuing with the example, if you have a single phone number field, or > > let a mobile number be entered in a field marked for landline, you will > > probabl

RE: Checking if email is valid

2023-11-06 Thread AVI GROSS via Python-list
Just mildly noticing the topics discussed have wandered quite a bit away from Python, let alone even programming. Phone numbers are not what they used to be. They tend to be quite portable and in some ways can be chained so my house phone rings through to my cell phone but a text will not be

Re: Detect naming typos (AttributeError) in function names

2023-11-06 Thread Christian Buhtz via Python-list
hint that "pylint" is able to detect problems like this. -- https://mail.python.org/mailman/listinfo/python-list

Aw: Re: pip/pip3 confusion and keeping up to date

2023-11-07 Thread Karsten Hilbert via Python-list
> > .From all the posts I gather the answer to my question is > > "simply": unpackaged-but-needed modules need to be packaged. > > I think there is one aspect that isn't getting consideration here. And > that is whether or not you want these packages inst

Re: Detect naming typos (AttributeError) in function names

2023-11-07 Thread Thomas Passin via Python-list
On 11/7/2023 2:48 AM, Christian Buhtz via Python-list wrote: Hello Dieter, thanks for your reply. Am 06.11.2023 19:11 schrieb Dieter Maurer: One option is a test suite (--> Python's "unittest" package) with a sufficiently high coverage (near 100 %). Yes, that is the prima

Re: Checking if email is valid

2023-11-07 Thread Grant Edwards via Python-list
On 2023-11-06, Greg Ewing via Python-list wrote: > On 7/11/23 7:45 am, Mats Wichmann wrote: >> Continuing with the example, if you have a single phone number field, or >> let a mobile number be entered in a field marked for landline, you will >> probably assume you ca

Re: Python Golf

2023-11-07 Thread Jon Ribbens via Python-list
On 2023-11-07, Stefan Ram wrote: > I read this in a shell newsgroup: > > perl -anE '$s += $F[1]; END {say $s}' in > > , so I wrote > > py -c "import sys; print(sum(int(F.split()[1])for F in sys.stdin))" > to show that this is possible with Pyt

Re: Checking if email is valid

2023-11-07 Thread D'Arcy Cain via Python-list
On 2023-11-07 08:40, Grant Edwards via Python-list wrote: If you, as a web developer, want the user to enter a text-message capable phone number, then ASK FOR THAT! And you may as well ask if they even want you to send texts whether they can technically receive them or not. -- D'Arc

Writing to clipboard in Python 3.11

2023-11-07 Thread Rob Cliffe via Python-list
Recently I switched from Python 3.8.3 to Python 3.11.4.  A strange problem appeared which was not there before: I am using the win32clipboard backage (part of pywin32), and when I use SetClipboardData() to write text which consists ENTIRELY OF DIGITS to the clipboard, I either get an error (not

RE: Python Golf

2023-11-07 Thread AVI GROSS via Python-list
you had python import sys by default and perhaps even create a briefer alias for sys.stdin, then this gets shorter: py -c "import sys; print(sum(int(F.split()[1])for F in sys.stdin))" On Behalf Of Jon Ribbens via Python-list Sent: Tuesday, November 7, 2023 11:06 AM To: python-list@

RE: Checking if email is valid

2023-11-07 Thread AVI GROSS via Python-list
about Python. What strikes me as a useful direction is for people to suggest what resources and methods in the Python world are helpful. Examples would be modules that have been tested and used that do things well such as validating phone numbers or emails, perhaps flexibly so that if a validation

fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Egon Frerich via Python-list
enter'], ['Aufg', 2, 4, 'u', '', 'center', 'center'], ['Text', 25, 25, 's', '-', 'left', 'left'], ['Ergänzung', 12, 12, 's', '-', 'left', 'left'], ['Betrag', 13, 13, 's', '', 'right', 'right'], ['W', 1, 2, 's', '', 'center', 'center'], ['WBetrag', 7, 7, 's', '', 'right', 'right'], ['Kurs', 6, 6, 's', '', 'right', 'right']] 0 0 3 4 Traceback (most recent call last):   File "/home/egon/Entw/Geldspur/geldspur/testGeldspurGUI.py", line 15, in     from tests.testU2 import testU2   File "/home/egon/Entw/Geldspur/geldspur/tests/testU2.py", line 9, in     from gui.GUI_Konfig import GUIcfg   File "/home/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 11, in     class GUIcfg:   File "/home/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 90, in GUIcfg     ["%s%s%s " % (i[fCONV_AUSRICHTG], i[fLG2], i[fTYP]) for i in Felder])   File "/home/egon/Entw/Geldspur/geldspur/gui/GUI_Konfig.py", line 90, in     ["%s%s%s " % (i[fCONV_AUSRICHTG], i[fLG2], i[fTYP]) for i in Felder]) NameError: name 'fCONV_AUSRICHTG' is not defined You see "Felder" and with "0 0 3 4" the correct value 4 for fCONV_AUSRICHTG. But there is the NameError. What does mean? Is there a change from python2 to python3? Egon -- https://mail.python.org/mailman/listinfo/python-list

Re: Writing to clipboard in Python 3.11

2023-11-07 Thread Thomas Passin via Python-list
On 11/5/2023 7:51 PM, Rob Cliffe via Python-list wrote: Recently I switched from Python 3.8.3 to Python 3.11.4.  A strange problem appeared which was not there before: I am using the win32clipboard backage (part of pywin32), and when I use SetClipboardData() to write text which consists

RE: Writing to clipboard in Python 3.11

2023-11-07 Thread Jim Schwartz via Python-list
It doesn't work in python 3.12.0 -Original Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Tuesday, November 7, 2023 12:08 PM To: [email protected] Subject: Re: Writing to clipboard in Python 3.11 On 11/5/2023 7:51 PM, Rob Cliffe via Python-list

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Thomas Passin via Python-list
On 11/7/2023 12:47 PM, Egon Frerich via Python-list wrote: I've no idea why this happens. In a module there are lists and definitions:     Felder = [     # Name   lg1  lg2 typ   Ausrichtung Holen Prüfen Prüfvorg     ["Jahr", 4, 5, "u", "", "

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Jim Schwartz via Python-list
Where do you define fCONV_AUSRICHTG? It must be initialized or defined somewhere. Did you leave out a statement from the python 2 version? Sent from my iPhone > On Nov 7, 2023, at 1:06 PM, Thomas Passin via Python-list > wrote: > > On 11/7/2023 12:47 PM, Egon Frerich via Pytho

Re: Python Golf

2023-11-07 Thread Jon Ribbens via Python-list
why it's called "golf"! It would be basically insane to use open(0) instead of sys.stdin like this except where the length of the source code overrides all other considerations - which is essentially never, unless playing code golf... -- https://mail.python.org/mailman/listinfo/python-list

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Thomas Passin via Python-list
On 11/7/2023 3:29 PM, MRAB via Python-list wrote: On 2023-11-07 19:20, Jim Schwartz via Python-list wrote: Where do you define fCONV_AUSRICHTG? It must be initialized or defined somewhere. Did you leave out a statement from the python 2 version? It's given its value

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-07 Thread Greg Ewing via Python-list
cases, such as this one. There are various ways you could work around this. I would suggest moving the offending code outside the class and qualifying the constants it uses with the class name. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Help

2023-11-07 Thread Mike Dewhirst via Python-list
On 7/11/2023 9:02 am, Jason Friedman via Python-list wrote: On Sun, Nov 5, 2023 at 1:23 PM office officce via Python-list < [email protected]> wrote: which python version is better to be used and how to make sure it works on my window 10 because i downloaded it and it never worke

on a tail-recursive square-and-multiply

2023-11-07 Thread Julieta Shem via Python-list
nge the base. That seems too much for my small head. Can you help? -- https://mail.python.org/mailman/listinfo/python-list

Re: on a tail-recursive square-and-multiply

2023-11-07 Thread Michael Torrie via Python-list
On 11/7/23 18:26, Julieta Shem via Python-list wrote: > For the first time I'm trying to write a tail-recursive > square-and-multiply and, even though it /seems/ to work, I'm not happy > with what I wrote and I don't seem to understand it so well. > &g

Re: on a tail-recursive square-and-multiply

2023-11-07 Thread Greg Ewing via Python-list
write this tail-recursively? Is it just an exercise? Note that Python doesn't optimise tail calls, so anything that can be done tail-recursively is probably better done iteratively. --8<---cut here---start->8--- def sam(b, e, m, acc = 1): if e =

Re: fCONV_AUSRICHTG is not defined - Why?

2023-11-08 Thread Egon Frerich via Python-list
Am 07.11.23 um 20:10 schrieb MRAB via Python-list: On 2023-11-07 18:30, dn via Python-list wrote: On 08/11/2023 06.47, Egon Frerich via Python-list wrote: I've no idea why this happens. In a module there are lists and definitions: ... ["%s%s%s " % (i[fCONV_AUSRICHTG],

Re: on a tail-recursive square-and-multiply

2023-11-08 Thread Julieta Shem via Python-list
> > Stepping back a bit, why do you feel the need to write this > tail-recursively? Is it just an exercise? Yes --- an exercise. (It would be relevant if I were in a language that gives me tail-call optimization. I'm preparing myself for when that happens.) > Note that Python d

Re: on a tail-recursive square-and-multiply

2023-11-09 Thread Julieta Shem via Python-list
Julieta Shem writes: [...] > I agree. By the way, I once read or watched an interview with Guido van > Rossum and and he was asked why not to tail-call optimize Python and the > answer he gave --- IIRC --- was that tail-call optimization makes it > harder for a beginner to unders

SQL rollback of multiple inserts involving constraints

2023-11-10 Thread Loris Bennett via Python-list
doing wrong? Apologies if this is actually an SQL question rather than something related to SQLAlchemy. Cheers, Loris -- This signature is currently under constuction. -- https://mail.python.org/mailman/listinfo/python-list

Re: SQL rollback of multiple inserts involving constraints

2023-11-10 Thread Jacob Kruger via Python-list
ruger +2782 413 4791 "Resistance is futile!...Acceptance is versatile..." On 2023/11/10 11:15, Loris Bennett via Python-list wrote: Hi, In my MariaDB database I have a table 'people' with 'uid' as the primary key and a table 'groups' with 'gid'

SQLObject 3.11.0

2023-11-11 Thread Oleg Broytman via Python-list
60075/7976758 For a more complete list, please see the news: http://sqlobject.org/News.html What is SQLObject ===== SQLObject is a free and open-source (LGPL) Python object-relational mapper. Your database tables are described as classes, and rows are instances of those classes.

Beep on WIndows 11

2023-11-11 Thread Rob Cliffe via Python-list
 Apologies if this is not a Python question. I  recently moved from a WIndows 10 laptop to a Windows 11 one. Although there is nothing wrong with the sound on the new machine (I can listen to podcasts and watch videos), I find that outputting "\a" to the console (aka stdout) no longer

RE: Beep on WIndows 11

2023-11-12 Thread Y Y via Python-list
I am curious and humble to ask: What is the purpose of a BEEP? -Original Message- From: Python-list On Behalf Of Rob Cliffe via Python-list Sent: Sunday, November 12, 2023 6:50 AM To: Python Subject: Beep on WIndows 11  Apologies if this is not a Python question. I  recently moved

Re: Beep on WIndows 11

2023-11-12 Thread Dan Sommers via Python-list
On 2023-11-11 at 23:44:19 +, Y Y via Python-list wrote: > I am curious and humble to ask: What is the purpose of a BEEP? It's a simple way for a terminal-based program to alert (hence '\a') a user or an operator that their attention is requested or required

Re: Beep on WIndows 11

2023-11-12 Thread Chris Angelico via Python-list
On Sun, 12 Nov 2023 at 21:27, Y Y via Python-list wrote: > > I am curious and humble to ask: What is the purpose of a BEEP? > There are several purposes. I can't say which of these are relevant to the OP, but some or all of them could easily be. * A very very simple notificati

Re: Beep on WIndows 11

2023-11-12 Thread Chris Angelico via Python-list
On Mon, 13 Nov 2023 at 04:13, MRAB via Python-list wrote: > In the old days, with a BBC micro, that was simple. It had 3 tone > channels and 1 white noise channel, with control over frequency, > duration and volume, beeps on different channels could be synchronised > to start at t

Re: SQL rollback of multiple inserts involving constraints

2023-11-13 Thread Loris Bennett via Python-list
n-a-flush-and-commit-baec6c2410a9 > > > HTH Yes, thank you, it does. I hadn't been aware of 'flush'. > Jacob Kruger > +2782 413 4791 > "Resistance is futile!...Acceptance is versatile..." > > > On 2023/11/10 11:15, Loris Bennett via Python-list wrot

xor operator

2023-11-13 Thread Dom Grigonis via Python-list
those that do contain loops that result in very poor performance. Regards, DG -- https://mail.python.org/mailman/listinfo/python-list

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

2023-11-13 Thread Jacob Kruger via Python-list
Had a look at the following bit of introduction to using python and flet to build cross-platform flutter-based apps using same python code, and, while it seems to work alright if tell it to run as under GUI here on windows desktop, and, while can get it to fire up PWA version as well, that&#

Re: xor operator

2023-11-13 Thread Dom Grigonis via Python-list
. Regards, DG > On 13 Nov 2023, at 19:42, Barry wrote: > > > >> On 13 Nov 2023, at 15:16, Dom Grigonis via Python-list >> wrote: >> >> I think it could be useful to have `xor` builtin, which has API similar to >> the one of `any` and `all`. >

Re: xor operator

2023-11-13 Thread Michael Speer via Python-list
. for intermediate in itertools.accumulate( iterable, (lambda x, y: x + bool(y)), initial = 0 ): ... if intermediate > n: ... return False ... return intermediate == n On Mon, Nov 13, 2023 at 4:05 PM Barry via Python-list < [email protected]> wrote: > > > > On 13 Nov 2023,

Re: xor operator

2023-11-13 Thread Dom Grigonis via Python-list
> And explain why it is xor. > > Barry > -- https://mail.python.org/mailman/listinfo/python-list

<    28   29   30   31   32   33   34   35   36   37   >