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 once, to see

RE: Checking if email is valid

2023-11-02 Thread AVI GROSS via Python-list
I have never had a need to check email but in my reading over the years, I am aware of modules of multiple kinds you can use to do things like parsing dates, URL and email addresses and probably many other such things into some kind of object and then you can use aspects of the object to do

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 actually implements "the

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: python-list@python.org Subject: Re:

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: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Jon Ribbens via Python-list
On 2023-11-02, Chris Green wrote: > Jon Ribbens wrote: >> On 2023-11-02, Dieter Maurer wrote: >> > Chris Green wrote at 2023-11-2 10:58 +: >> >> ... >> >>So, going on from this, how do I do the equivalent of "apt update; apt >> >>upgrade" for my globally installed pip packages? >> > >> >

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: > Jon Ribbens wrote: >> 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. >> > >> >

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Chris Green via Python-list
Jon Ribbens wrote: > 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

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Chris Green via Python-list
Jon Ribbens wrote: > On 2023-11-02, Dieter Maurer wrote: > > Chris Green wrote at 2023-11-2 10:58 +: > >> ... > >>So, going on from this, how do I do the equivalent of "apt update; apt > >>upgrade" for my globally installed pip packages? > > > > `pip list -o` will tell you for which packages

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 managed to code an

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 executable in > PATH.

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Jon Ribbens via Python-list
On 2023-11-02, Dieter Maurer wrote: > Chris Green wrote at 2023-11-2 10:58 +: >> ... >>So, going on from this, how do I do the equivalent of "apt update; apt >>upgrade" for my globally installed pip packages? > > `pip list -o` will tell you for which packages there are upgrades > available. >

Re: Checking if email is valid

2023-11-02 Thread Jon Ribbens via Python-list
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 actually implements "the standard" as in RFC 2822 section 3.4.1 (which can contain, for example,

Re: Checking if email is valid

2023-11-02 Thread D'Arcy Cain via Python-list
On 2023-11-02 00:18, AVI GROSS via Python-list wrote: Yes, it would be nice if there was a syntax for sending a test message sort of like an ACK that is not delivered to the recipient but merely results in some status being sent back such as DELIVERABLE or NO SUCH USER or even MAILBOX FULL. It

Errors

2023-11-02 Thread Zigocut Technologies via Python-list
Hello, I would like to develop Mobile Applications using the Kivy Python Framework but I am having difficulty and these are the errors I am finding " C:\WINDOWS\system32>python3 --version Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Dieter Maurer via Python-list
Chris Green wrote at 2023-11-2 10:58 +: > ... >So, going on from this, how do I do the equivalent of "apt update; apt >upgrade" for my globally installed pip packages? `pip list -o` will tell you for which packages there are upgrades available. `pip install -U ...` will upgrade packages. Be

RE: Checking if email is valid

2023-11-02 Thread AVI GROSS via Python-list
Yes, Chris, many things can be used for lesser purposes. Perhaps this could be like when people automate guessing passwords and one defense is to stop accepting after N bad guesses till some external method resets things. -Original Message- From: Python-list On Behalf Of Chris Angelico

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
> Please re-read. > Discussion is about "closeness". > Thus, what you might expect from email servers and Admins, NOT what you > should do. That part should be quite evident by now! > My apologies for making a mistake. Simon. signature.asc Description: OpenPGP digital signature --

Re: Checking if email is valid

2023-11-02 Thread D'Arcy Cain via Python-list
On 2023-11-02 02:04, Chris Angelico via Python-list wrote: On Thu, 2 Nov 2023 at 15:20, AVI GROSS via Python-list wrote: Yes, it would be nice if there was a syntax for sending a test message sort of like an ACK that is not delivered to the recipient but merely results in some status being

pip/pip3 confusion and keeping up to date

2023-11-02 Thread Chris Green via Python-list
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 in PATH. There's still both /usr/bin/pip and

Re: Checking if email is valid

2023-11-02 Thread Dan Purgert via Python-list
On 2023-11-02, dn wrote: > On 02/11/2023 19.46, Simon Connah via Python-list wrote: >> [...] >> My goal is to make a simple mailing list platform. I guess I could >> just send email to an address and if it bounces then I can remove it >> from the database. Thing is I'm not sure how close to a real

Re: Checking if email is valid

2023-11-02 Thread Alan Bawden via Python-list
Chris Angelico writes: On Thu, 2 Nov 2023 at 15:20, AVI GROSS via Python-list wrote: > Yes, it would be nice if there was a syntax for sending a test > message sort of like an ACK that is not delivered to the recipient > but merely results in some status being sent back such as

Re: Checking if email is valid

2023-11-02 Thread Jon Ribbens via Python-list
On 2023-11-02, D'Arcy Cain wrote: > On 2023-11-01 17:17, Chris Angelico via Python-list wrote: >> On Thu, 2 Nov 2023 at 08:09, Grant Edwards via Python-list >> wrote: >>> Make sure it has an '@' in it. Possibly require at least one '.' >>> after the '@'. >> >> No guarantee that there'll be a

Re: Checking if email is valid

2023-11-02 Thread dn via Python-list
On 02/11/2023 20.28, Simon Connah wrote: I'm not sure that would be practical. As I'm setting up a mailing list server I don't know if someone in the future is going to need to use one of those aliases and testing manually would be tedious. Please re-read. Discussion is about "closeness".

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
> Agreed. > > However, with names that are frequently misspelled or which are > commonly-spelled slightly differently, the 'trick' is to anticipate > problems and set up aliases which forward messages to the correct address*. > > eg Kelvin -> Kevlin > > Niel, Neal, Neale (etc) -> Neil > >

Re: Checking if email is valid

2023-11-02 Thread Grizzy Adams via Python-list
Thursday, November 02, 2023 at 6:46, Simon Connah via Python-list wrote: Re: Checking if email is valid (at least in part) >My goal is to make a simple mailing list platform. I guess I could just send >email to an address and if it bounces then I can remove it from the database. That function

Re: Checking if email is valid

2023-11-02 Thread dn via Python-list
On 02/11/2023 19.56, Chris Angelico via Python-list wrote: On Thu, 2 Nov 2023 at 17:47, Simon Connah wrote: My goal is to make a simple mailing list platform. I guess I could just send email to an address and if it bounces then I can remove it from the database. Thing is I'm not sure how

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
> > > See https://www.linuxjournal.com/article/9585?page=0,0 > That looks painful to maintain! signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-02 Thread dn via Python-list
On 02/11/2023 19.46, Simon Connah via Python-list wrote: On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list python-list@python.org wrote: Could someone push me in the right direction please? I just want to find out if a string is a valid email address. There is only one way

Re: Checking if email is valid

2023-11-02 Thread Chris Angelico via Python-list
On Thu, 2 Nov 2023 at 17:47, Cameron Simpson via Python-list wrote: > > On 02Nov2023 17:04, Chris Angelico wrote: > >On Thu, 2 Nov 2023 at 15:20, AVI GROSS via Python-list > > wrote: > >> Yes, it would be nice if there was a syntax for sending a test > >> message sort > >> of like an ACK that is

Re: Checking if email is valid

2023-11-02 Thread Chris Angelico via Python-list
On Thu, 2 Nov 2023 at 17:47, Simon Connah wrote: > > My goal is to make a simple mailing list platform. I guess I could just send > email to an address and if it bounces then I can remove it from the database. > Thing is I'm not sure how close to a real email address an email has to be in >

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
> > On 2023-11-01, Chris Angelico ros...@gmail.com wrote: > > > On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list > > python-list@python.org wrote: > > > > > Could someone push me in the right direction please? I just want to > > > find out if a string is a valid email address. > >

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
> > > On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list > python-list@python.org wrote: > > > Could someone push me in the right direction please? I just want to find > > out if a string is a valid email address. > > > There is only one way to know that a string is a valid email

Re: Checking if email is valid

2023-11-02 Thread Cameron Simpson via Python-list
On 02Nov2023 17:04, Chris Angelico wrote: On Thu, 2 Nov 2023 at 15:20, AVI GROSS via Python-list wrote: Yes, it would be nice if there was a syntax for sending a test message sort of like an ACK that is not delivered to the recipient but merely results in some status being sent back such as

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
> > On 2023-11-01, Simon Connah via Python-list python-list@python.org wrote: > > > I'm building a simple project using smtplib and have a > > question. I've been doing unit testing but I'm not sure how to check > > if an email message is valid. > > > Send an e-mail using it? If the right

Re: Checking if email is valid

2023-11-02 Thread Chris Angelico via Python-list
On Thu, 2 Nov 2023 at 15:20, AVI GROSS via Python-list wrote: > > Yes, it would be nice if there was a syntax for sending a test message sort > of like an ACK that is not delivered to the recipient but merely results in > some status being sent back such as DELIVERABLE or NO SUCH USER or even >