Re: Checking if email is valid
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 dot after the at. (Technically there's no guarantee of an at sign either, but email addresses without at signs are local-only, so in many contexts, you can assume there needs to be an at.) druid!darcy - doesn't work any more but not because it is syntactically incorrect. Remember the good old days when we were able to test if an address existed without sending? That was before the black hats discovered the Internet. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list
Re: Checking if email is valid
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 sent back such as DELIVERABLE or NO SUCH USER or even MAILBOX FULL. Yes, it would! Spammers would be able to use this syntax to figure out exactly which addresses actually have real people connected to it. It would save them so much trouble! Brilliant idea. Which is exactly why we stopped doing it. In fact, mailing software may even have a control to turn it back on but definitely it doesn't reply to the request as delivered. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list
Re: Checking if email is valid
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 used to do that. The facility was very quickly turned off. I note earlier iterations of email had addressed like mach1!mach2!mach3!ihnp4!mach5!mach6!user or even mach1!mach2!user@mach3 and I remember tools that analyzed what other machines various machines claimed to have a direct connection to and tried to figure out a connection from your source to destination, perhaps a shorter one or maybe a less expensive one. Hence machines like ihnp4 and various universities that were densely connected to others got lots of traffic. In that scenario, validity had another meaning. Yep. It's called UUCP. It still exists. You can even do UUCP over TCP/IP. -- D'Arcy J.M. Cain System Administrator, Vex.Net http://www.Vex.Net/ IM:da...@vex.net VoIP: sip:da...@vex.net -- https://mail.python.org/mailman/listinfo/python-list
Re: Checking if email is valid
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 @-containing string twice) are deluding themselves. And don't get me started on phone number validation. The most annoying thing to me, though, is sites that reject names that have an apostrophe in them. I hate being told that my name, that I have been using for over seventy years, is invalid. OK, now that I am started, what else? Oh yah. Look at your credit card. The number has spaces in it. Why do I have to remove them. If you don't like them then you are a computer, just remove them. When do we stop working for computers and have the computers start working for us? -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Checking if email is valid
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 attacks without just saying "ban all apostrophes everywhere". Or perhaps it's idiot "security consultancies" who make it a tick-box requirement. https://xkcd.com/327/ OK, now that I am started, what else? Oh yah. Look at your credit card. The number has spaces in it. Why do I have to remove them. If you don't like them then you are a computer, just remove them. Yes, this is also very stupid and annoying. Does nobody who works for the companies making these sorts of websites ever use their own, or indeed anyone else's, website? Gotta wonder for sure. It could also be the case of programmers depending on user input but the users insist on living with the bugs and/or working around them. We made crash reporting dead simple to report on and still users didn't bother. We would get the traceback and have to guess what the user was doing. Honestly I don't understand why every web application platform doesn't automatically strip all leading and trailing whitespace on user input by default. It's surely incredibly rare that it's sensible to preserve it. (I see Django eventually got around to this in version 1.9.) Yes, I have done that forever. Never had a complaint about it dropping characters. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Checking if email is valid
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'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Multiplication
On 2024-04-01 12:35, Joel Goldstick via Python-list wrote: On Mon, Apr 1, 2024 at 1:26 PM Piergiorgio Sartor via Python-list ^^^ from math import * a = 2 b = 3 print( a * b ) I guess the operator "*" can be imported from any module... :-) No import is necessary. Of course not. Check the date on the message. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list
Re: FileNotFoundError thrown due to file name in file, rather than file itself
On 11/13/24 02:12, Roel Schroeven via Python-list wrote: What I most often do is use one logfile per day, with the date in the filename. Then simply delete all files older than 7 days, or 30 days, or whatever is useful for the task at hand. Not only does that sidestep any issues with rotating logs, but I also find it's very useful to have the date in the filename. I do something similar for my system logs except that I let the system use the usual names and, at midnight, I rename the file appending the previous day's date to it and restarting services. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vybenetworks.com VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list