Re: Question(s)

2023-10-24 Thread Grant Edwards via Python-list
On 2023-10-24, o1bigtenor via Python-list wrote: > Is there a way to verify that a program is going to do what it is > supposed to do even before all the hardware has been assembled and > installed and tested? It depends on what you mean by "verify ...". If you want to prov

Re: Question(s)

2023-10-24 Thread Dan Purgert via Python-list
maybe the hardware is faulty, etc. -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860 -- https://mail.python.org/mailman/listinfo/python-list

Re: Question(s)

2023-10-24 Thread Grant Edwards via Python-list
On 2023-10-24, Dan Purgert via Python-list wrote: > On 2023-10-24, o1bigtenor wrote: >> Greetings >> >> (Sorry for a nebulous subject but dunno how to have a short title for >> a complex question.) >> [...] >> Is there a way to verify that a program is g

Re: Question(s)

2023-10-24 Thread Thomas Passin via Python-list
On 10/24/2023 8:22 AM, o1bigtenor via Python-list wrote: Greetings (Sorry for a nebulous subject but dunno how to have a short title for a complex question.) I have been using computers for a long time but am only beginning my foray into the galaxy of programming. Have done little to this

Re: Question(s)

2023-10-24 Thread Grant Edwards via Python-list
On 2023-10-24, Thomas Passin via Python-list wrote: > Something less ambitious than a full proof of correctness of an > arbitrary program can sometimes be achieved. The programming team > for the Apollo moon mission developed a system which, if you would > write your requirements

Re: Question(s)

2023-10-24 Thread Grant Edwards via Python-list
On 2023-10-24, o1bigtenor via Python-list wrote: > So how does one test software then? That's what customers are for! [Actually, that's true more often than it should be.] -- https://mail.python.org/mailman/listinfo/python-list

Re: Question(s)

2023-10-24 Thread Alan Gauld via Python-list
On 24/10/2023 22:51, Grant Edwards via Python-list wrote: >>> Is there a way to verify that a program is going to do what it is >>> supposed to do even before all the hardware has been assembled and >>> installed and tested? > And the specified customer requiremen

Re: Question(s)

2023-10-24 Thread Alan Gauld via Python-list
On 25/10/2023 00:08, o1bigtenor via Python-list wrote: > So how does one test software then? Testing is very different to proving! As an industry we do a lot of testing at many different levels. On bigger projects you'll find: - Unit tests - testing small fragments of a bigger

Re: Question(s)

2023-10-24 Thread Thomas Passin via Python-list
On 10/24/2023 7:15 PM, o1bigtenor wrote: On Tue, Oct 24, 2023 at 6:09 PM Thomas Passin via Python-list wrote: snip By now you have read many responses that basically say that you cannot prove that a given program has no errors, even apart from the hardware question. Even if it could be

RE: Question(s)

2023-10-24 Thread AVI GROSS via Python-list
hird party who might be able to help you with the open-source software. Unless your project accepts the realities, why start? -Original Message----- From: Python-list On Behalf Of o1bigtenor via Python-list Sent: Tuesday, October 24, 2023 7:15 PM To: Thomas Passin Cc: [email protected]

Re: Question(s)

2023-10-24 Thread Chris Angelico via Python-list
On Wed, 25 Oct 2023 at 12:11, Thomas Passin via Python-list wrote: > This doesn't mean that no program can ever be proven to halt, nor that > no program can never be proven correct by formal means. Will your > program be one of those? The answer may never come ... Indeed,

Re: Question(s)

2023-10-24 Thread Chris Angelico via Python-list
On Wed, 25 Oct 2023 at 12:20, AVI GROSS via Python-list wrote: > Consider an example of bit rot. I mean what if your CPU or hard disk has a > location where you can write a byte and read it back multiple times and > sometimes get the wrong result. To be really cautions, you might

Re: How to sort this without 'cmp=' in python 3?

2023-10-24 Thread Mike H via Python-list
gt; > '953433230' > > > > nums.sort(cmp=lambda a,b: cmp(a+b, b+a), reverse=True) > > > > But how to do this in python 3? > > > > Thank you > While cmp_to_key is neat doing it by hand should also be instructive. > Essentially you move the comp

Re: How to sort this without 'cmp=' in python 3?

2023-10-24 Thread Chris Angelico via Python-list
On Wed, 25 Oct 2023 at 13:02, Mike H via Python-list wrote: > Is it possible to use lambda expression instead of defining a `Key` class? > Something like `sorted(my_list, key = lambda x, y: x+y > y+x)`? Look up functools.cmp_to_key. ChrisA -- https://mail.python.org/mailman/listin

RE: Question(s)

2023-10-24 Thread AVI GROSS via Python-list
your source code in the original language, that can open up ways others might find ways to break it, more so than a compiled program that you only can read in a more opaque way. -Original Message- From: Python-list On Behalf Of Chris Angelico via Python-list Sent: Tuesday, October 24

Re: Question(s)

2023-10-24 Thread Thomas Passin via Python-list
On 10/24/2023 7:37 PM, Grant Edwards via Python-list wrote: On 2023-10-24, Thomas Passin via Python-list wrote: Something less ambitious than a full proof of correctness of an arbitrary program can sometimes be achieved. The programming team for the Apollo moon mission developed a system

Re: Simple webserver

2023-10-25 Thread Frank Millman via Python-list
On 2023-10-22 7:35 PM, Dieter Maurer via Python-list wrote: The web server in Python's runtime library is fairly simple, focusing only on the HTTP requirements. You might want additional things for an HTTP server exposed on the internet which should potentially handle high trafic

Re: Simple webserver

2023-10-25 Thread Chris Angelico via Python-list
On Wed, 25 Oct 2023 at 19:00, Frank Millman via Python-list wrote: > 2. Instead of running as a stand-alone server, run my app as a > reverse-proxy using Nginx. I tested this a few years ago using Apache, > and it 'just worked', so I am fairly sure that it will work with Ngi

Re: Question(s)

2023-10-25 Thread Chris Angelico via Python-list
On Wed, 25 Oct 2023 at 21:46, o1bigtenor wrote: > > 2. Catch the failure as you save. We have a lot of tools that can help > > you to spot bugs. > > Tools like this for python please. Various ones. Type checkers like MyPy fall into this category if you set your system up to

Re: Question(s)

2023-10-25 Thread Chris Angelico via Python-list
ock, the more efficient, but if there are too many errors you will lose data. So there's a tradeoff. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Question(s)

2023-10-25 Thread Dieter Maurer via Python-list
mockup hardware you do not yet have. -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple webserver

2023-10-25 Thread Dieter Maurer via Python-list
p as a >reverse-proxy using Nginx. I tested this a few years ago using Apache, >and it 'just worked', so I am fairly sure that it will work with Nginx >as well. Nginx can then provide the additional functionality that Dieter >has mentioned. Good ideas. -- https://mail.python.org/mailman/listinfo/python-list

Re: Question(s)

2023-10-25 Thread Chris Angelico via Python-list
On Wed, 25 Oct 2023 at 22:46, o1bigtenor via Python-list wrote: > > On Wed, Oct 25, 2023 at 6:24 AM Dieter Maurer wrote: > > > > o1bigtenor wrote at 2023-10-24 07:22 -0500: > > > ... > > >Is there a way to verify that a program is going to do what it is >

Re: Question(s)

2023-10-25 Thread Dieter Maurer via Python-list
o1bigtenor wrote at 2023-10-25 06:44 -0500: >On Wed, Oct 25, 2023 at 6:24?AM Dieter Maurer wrote: > ... >> There are different kinds of errors. >> >> Some can be avoided by using an integrated development environment >> (e.g. misspellings, type mismatches, ...). &g

Re: Question(s)

2023-10-25 Thread Dieter Maurer via Python-list
o1bigtenor wrote at 2023-10-25 07:50 -0500: >> There are several others, >> e.g. "ECLIPSE" can be used for Python development. > >Is 'Eclipse' a Windows oriented IDE? No. ==> "https://en.wikipedia.org/wiki/Eclipse_(software)" -- https://mail.python.org/mailman/listinfo/python-list

Re: Question(s)

2023-10-25 Thread Grant Edwards via Python-list
On 2023-10-25, o1bigtenor via Python-list wrote: > Haven't heard of a python IDE - - - doesn't mean that there isn't such - - > just that I haven't heard of such. Is there a python IDE? Seriously? Now you're just trolling. google.com/search?q=python+ide&am

Re: Question(s)

2023-10-25 Thread Thomas Passin via Python-list
On 10/25/2023 9:21 AM, Thomas Passin wrote: On 10/25/2023 8:50 AM, o1bigtenor via Python-list wrote: On Wed, Oct 25, 2023 at 7:00 AM Dieter Maurer wrote: o1bigtenor wrote at 2023-10-25 06:44 -0500: On Wed, Oct 25, 2023 at 6:24?AM Dieter Maurer wrote: ... There are different kinds of

Re: Question(s)

2023-10-25 Thread Dieter Maurer via Python-list
o1bigtenor wrote at 2023-10-25 08:29 -0500: > ... >It would appear that something has changed. > >Went to the Eclipse download page, downloaded and verified (using sha-512). >Expanded software to # opt . >There is absolutely NO mention of anything python - - - java, c and

Re: Question(s)

2023-10-25 Thread Dan Purgert via Python-list
that can interact with the main program to twiddle the knobs and such, and ensure it's doing what was specified). Alternatively, you have to program your hardware and test directly on that. -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860 -- https://mail.python.org/mailman/listinfo/python-list

Re: Too Broad of an exception

2023-10-25 Thread Rene Kita via Python-list
rsutton wrote: > Hi all, > I am fairly new to python (ie < 2 years). I have a question about > pylint. I am running on windows 10/11, python 3.10.11. [...] > if p.returncode >= 8: > raise Exception(f'Invalid result: {p.returncode}') > &g

Re: Question(s)

2023-10-25 Thread Michael Torrie via Python-list
On 10/25/23 05:51, o1bigtenor via Python-list wrote: > Looks like I have another area to investigate. (grin!) > Any suggestions? Seems to me you're trying to run before you have learned to walk. Slow down, go to the beginning and just learn python, write some code, see if it runs.

RE: Question(s)

2023-10-25 Thread AVI GROSS via Python-list
ch software was compiled. Sure, you could play interactively with the BASIC interpreter, but much else could be delivered to you as an executable and it was not easy to know what it did without trying it and certainly it was not easy to make changes to it and resell it as your own. Where does pyt

SQLObject 3.10.3

2023-10-25 Thread Oleg Broytman via Python-list
version 0.0.78 was released in 2018. Tests - * Run tests with Python 3.12. CI -- * GHActions: Ensure ``pip`` only if needed This is to work around a problem in conda with Python 3.7 - it brings in wrong version of ``setuptools`` incompatible with Python 3.7. For a more complete l

Re: Question(s)

2023-10-25 Thread Alan Gauld via Python-list
On 25/10/2023 12:44, o1bigtenor via Python-list wrote: > Haven't heard of a python IDE - - - doesn't mean that there isn't such - - There are literally dozens with varying degrees of smartness. The big 4 all have Python plugins/environments: Eclipse, Netbeans, VisualStudio

Re: Question(s)

2023-10-25 Thread Thomas Passin via Python-list
On 10/25/2023 8:50 AM, o1bigtenor via Python-list wrote: On Wed, Oct 25, 2023 at 7:00 AM Dieter Maurer wrote: o1bigtenor wrote at 2023-10-25 06:44 -0500: On Wed, Oct 25, 2023 at 6:24?AM Dieter Maurer wrote: ... There are different kinds of errors. Some can be avoided by using an

Re: Too Broad of an exception

2023-10-25 Thread Kushal Kumaran via Python-list
oks quite inelegant. Like I said, I have a lot to learn. > >From what you've described of your problem, it seems like a small-ish utility program you're writing for your own use. You don't need any `try`...`except` blocks in such code. You just let the exception stop your program. -- regards, kushal -- https://mail.python.org/mailman/listinfo/python-list

Re: Question(s)

2023-10-25 Thread Thomas Passin via Python-list
On 10/25/2023 9:20 AM, Michael F. Stemper via Python-list wrote: On 24/10/2023 17.50, Thomas Passin wrote:    The programming team for the Apollo moon mission developed a system which,> if you would write your requirements in a certain way, could generate correct C code for them. Since

Re: Too Broad of an exception

2023-10-25 Thread Thomas Passin via Python-list
On 10/25/2023 11:49 AM, rsutton via Python-list wrote: On 10/25/2023 11:06 AM, Stefan Ram wrote: [email protected] (Stefan Ram) writes: outer quotation marks) prints some prominent exception types. After manually removing those that do not seem to apply, I am left with: "Assertion

Re: Question(s)

2023-10-25 Thread Dan Purgert via Python-list
On 2023-10-25, o1bigtenor wrote: > On Wed, Oct 25, 2023 at 7:00 AM Dieter Maurer wrote: >> [...] >> There are several others, >> e.g. "ECLIPSE" can be used for Python development. > > Is 'Eclipse' a Windows oriented IDE? > (Having a hard time f

Re: Question(s)

2023-10-25 Thread Jim Schwartz via Python-list
, 2023, at 7:55 AM, o1bigtenor via Python-list wrote: On Wed, Oct 25, 2023 at 7:00AM Dieter Maurer wrote: o1bigtenor wrote at 2023-10-25 06:44 -0500: On Wed, Oct 25, 2023 at 6:24?AM Dieter Maurer wrote: ... There are different kinds of

RE: Question(s)

2023-10-25 Thread AVI GROSS via Python-list
. Python already by default supports integers limited only in size by available memory. This can avoid some of the overflow problems when all you are allowed is 64 bits but it remains a constraint and a danger as even a fairly simple algorithm you can PROVE will work, will still fail if your program

Re: Question(s)

2023-10-26 Thread Thomas Passin via Python-list
On 10/26/2023 7:50 AM, o1bigtenor via Python-list wrote: On Wed, Oct 25, 2023 at 9:10 AM Dieter Maurer wrote: o1bigtenor wrote at 2023-10-25 08:29 -0500: ... It would appear that something has changed. Went to the Eclipse download page, downloaded and verified (using sha-512). Expanded

Re: Too Broad of an exception

2023-10-26 Thread Rene Kita via Python-list
Rene Kita wrote: > rsutton wrote: >> Hi all, >> I am fairly new to python (ie < 2 years). I have a question about >> pylint. I am running on windows 10/11, python 3.10.11. > [...] >> if p.returncode >= 8: >> raise Exception(f&

Re: Question(s)

2023-10-26 Thread Michael Torrie via Python-list
try to get it working. Failure is always an option. If I understand you correctly, this is for a hobby interest, so go at it and have fun. Stepping through code is a basic part of debugging in any language. They all have tools for it. Google for python debugging. "distinct needs for

Re: Question(s)

2023-10-26 Thread Michael Torrie via Python-list
n may not be possible or easy. But the MicroPython lists and forums will know more about that than I do. But there are some nice IDEs for developing code in MicroPython and deploying it to devices. -- https://mail.python.org/mailman/listinfo/python-list

Re: Too Broad of an exception

2023-10-26 Thread Mats Wichmann via Python-list
On 10/26/23 03:04, Rene Kita via Python-list wrote: Rene Kita wrote: rsutton wrote: Hi all, I am fairly new to python (ie < 2 years). I have a question about pylint. I am running on windows 10/11, python 3.10.11. [...] if p.returncode >= 8: raise Exception(f&#

Re: Question(s)

2023-10-26 Thread Thomas Passin via Python-list
On 10/26/2023 4:25 PM, o1bigtenor via Python-list wrote: On Thu, Oct 26, 2023 at 11:43 AM Michael Torrie via Python-list wrote: On 10/26/23 06:34, o1bigtenor wrote: Interesting - - - - ". . . see if it runs." - - - that's the issue! When the code is accessing sensors there is

Re: Question(s)

2023-10-26 Thread Dan Purgert via Python-list
On 2023-10-26, o1bigtenor wrote: > On Wed, Oct 25, 2023 at 10:19 AM Michael Torrie via Python-list > wrote: >> >> On 10/25/23 05:51, o1bigtenor via Python-list wrote: >> > Looks like I have another area to investigate. (grin!) >> > Any suggestions? >> >

RE: Question(s)

2023-10-26 Thread AVI GROSS via Python-list
I am not one for IDLE worship, Tenor. But if you have been getting a message here, it is that there are an amazing number of programs that support your use of python during the development phase and perhaps later. I actually often use an environment called RSTUDIO (now part of a new name of

Re: Question(s)

2023-10-26 Thread Thomas Passin via Python-list
On 10/26/2023 6:36 PM, AVI GROSS via Python-list wrote: I am not one for IDLE worship, Tenor. But if you have been getting a message here, it is that there are an amazing number of programs that support your use of python during the development phase and perhaps later. I actually often use an

RE: Question(s)

2023-10-26 Thread AVI GROSS via Python-list
can follow what it is doing, presents special challenges. Now if he ever wants to read in a .CSV file and analyze the data and make graphs and so on, I might chime in. For now, I am dropping out. Avi -Original Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent

Re: Question(s)

2023-10-26 Thread Thomas Passin via Python-list
someone is insisting on being instructed how to drive a race car in a race when he's only got a learner's permit. You just have to go through the experience of actually driving on streets and in traffic first. There is no substitute. TomP -Original Message- From: Python-list

Re: Question(s)

2023-10-27 Thread Greg Ewing via Python-list
Greg -- https://mail.python.org/mailman/listinfo/python-list

NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
Hi, I have two applications. One uses the system version of Python, which is 3.6.8, whereas the other uses Python 3.10.8 installed in a non-system path. For both applications I am using poetry with a pyproject.toml file which contains the version information and __init__.py at the root which

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
"Loris Bennett" writes: > Hi, > > I have two applications. One uses the system version of Python, which > is 3.6.8, whereas the other uses Python 3.10.8 installed in a non-system > path. For both applications I am using poetry with a pyproject.toml > file which cont

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
"Loris Bennett" writes: > "Loris Bennett" writes: > >> Hi, >> >> I have two applications. One uses the system version of Python, which >> is 3.6.8, whereas the other uses Python 3.10.8 installed in a non-system >> path. For both appl

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Dieter Maurer via Python-list
Loris Bennett wrote at 2023-10-27 09:29 +0200: > ... >For the application with the system Python this mechanism works, but for >the non-system Python I get the error: > > NameError: name '__version__' is not defined If you get exceptions (they usually end in `Error` (su

PyDev 11.0.2 Released

2023-10-29 Thread Fabio Zadrozny via Python-list
PyDev 11.0.2 Release Highlights Continuing with the updates to Python 3.12, the new release integrates the latest version of typeshed (so, *from typing import override* is now properly recognized). Also, it's now possible to specify vmargs in the python interpreter (and not just in the l

How to find any documentation for smbus?

2023-10-30 Thread Chris Green via Python-list
pened R/W, users of this module usually must have root permissions. FILE /usr/lib/python3/dist-packages/smbus.cpython-39-arm-linux-gnueabihf.so Even a list of available methods would be handy! :-) Presumably python3's smbus is just a wrapper so if I could find the underlying

Re: How to find any documentation for smbus?

2023-10-30 Thread Chris Green via Python-list
-in replacement of smbus". SO you can look > at its documentation for or use it instead of smbus. > > Disclaimer: I haven't any experience on this library Ah, thank you, I had come across smbus2 but wanted to stay with smbus if I could as it's in the Debian repositories. However, as you say, it claims to be a "drop-in replacement of smbus" so the documentation should be some help at least. -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list

Re: How to find any documentation for smbus?

2023-10-30 Thread Chris Green via Python-list
he differences between smbus and i2c, but nothing very helpful for a poor old application programmer like me! :-) -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list

Re: How to find any documentation for smbus?

2023-10-30 Thread Dieter Maurer via Python-list
t; import smbus >>>> dir (smbus) >['SMBus', '__doc__', '__file__', '__loader__', '__name__', '__package__', > '__spec__'] >>>> help(smbus) > ... What does `help(smbus.SMBus`) tell you? Almost surely, `SMBus` is a class providing the main access methods. -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-01 Thread Simon Connah via Python-list
ture.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Checking if email is valid

2023-11-01 Thread Simon Connah via Python-list
someone push me in the right direction please? I just want to find out if a string is a valid email address. Thank you. Simon. signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: Checking if email is valid

2023-11-01 Thread Chris Angelico via Python-list
On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list 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 address, and that's to send

Re: Checking if email is valid

2023-11-01 Thread Jon Ribbens via Python-list
On 2023-11-01, Chris Angelico wrote: > On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list > 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

Re: Checking if email is valid

2023-11-01 Thread Chris Angelico via Python-list
On Thu, 2 Nov 2023 at 06:02, Jon Ribbens via Python-list wrote: > > On 2023-11-01, Chris Angelico wrote: > > On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list > > wrote: > >> Could someone push me in the right direction please? I just want to > >> f

Re: Checking if email is valid

2023-11-01 Thread Mats Wichmann via Python-list
On 11/1/23 05:35, Simon Connah via Python-list wrote: OK. I've been doing some reading and that you should avoid regex to check email addresses. So what I was thinking was something like this: To be a little more specific, Avoid Rolling Your Own RegEx. It's very tricky, and you w

Re: Checking if email is valid

2023-11-01 Thread De ongekruisigde via Python-list
On 2023-11-01, Mats Wichmann wrote: > On 11/1/23 05:35, Simon Connah via Python-list wrote: >> OK. I've been doing some reading and that you should avoid regex to check >> email addresses. So what I was thinking was something like this: > > To be a little more specif

Re: Checking if email is valid

2023-11-01 Thread Grant Edwards via Python-list
On 2023-11-01, Simon Connah via Python-list 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 person gets the

Re: Checking if email is valid

2023-11-01 Thread Chris Angelico via Python-list
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 sig

Re: Checking if email is valid

2023-11-01 Thread Grant Edwards via Python-list
On 2023-11-01, 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&#x

Re: Checking if email is valid

2023-11-01 Thread Chris Angelico via Python-list
On Thu, 2 Nov 2023 at 08:52, Grant Edwards via Python-list wrote: > > On 2023-11-01, 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

Re: Checking if email is valid

2023-11-01 Thread Michael Torrie via Python-list
On 11/1/23 04:09, Simon Connah via Python-list wrote: > Hi, > > 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. Using regex sounds like a bad idea to me

Re: Checking if email is valid

2023-11-01 Thread Cameron Simpson via Python-list
On 01Nov2023 14:08, Grant Edwards wrote: On 2023-11-01, Simon Connah via Python-list 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. [...] Could someone push

Re: Checking if email is valid

2023-11-01 Thread D'Arcy Cain via Python-list
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. (

Re: Checking if email is valid

2023-11-01 Thread Ian Hobson via Python-list
See https://www.linuxjournal.com/article/9585?page=0,0 On 01/11/2023 17:09, Simon Connah via Python-list wrote: Hi, 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. Usi

RE: Checking if email is valid

2023-11-01 Thread AVI GROSS via Python-list
universities that were densely connected to others got lots of traffic. In that scenario, validity had another meaning. -Original Message- From: Python-list On Behalf Of D'Arcy Cain via Python-list Sent: Wednesday, November 1, 2023 9:57 PM To: [email protected] Subject: Re: Checking if

Re: Checking if email is valid

2023-11-01 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

Re: Checking if email is valid

2023-11-01 Thread Simon Connah via Python-list
> > On 2023-11-01, Simon Connah via Python-list [email protected] 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. >

Re: Checking if email is valid

2023-11-01 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-01 Thread Simon Connah via Python-list
> > > On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list > [email protected] 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

Re: Checking if email is valid

2023-11-01 Thread Simon Connah via Python-list
> > On 2023-11-01, Chris Angelico [email protected] wrote: > > > On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list > > [email protected] wrote: > > > > > Could someone push me in the right direction please? I just want to > > >

Re: Checking if email is valid

2023-11-01 Thread Chris Angelico via Python-list
mail has to be in > order to be bounced. If it was completely wrong it might just swallowed up. > Every address is completely separate. There is no "closeness". Just send email to an address. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

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

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

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
, > =dn 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. Simon. signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

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

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 bac

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

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

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

Re: Checking if email is valid

2023-11-02 Thread Simon Connah via Python-list
gital signature -- https://mail.python.org/mailman/listinfo/python-list

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

2023-11-02 Thread Dieter Maurer via Python-list
consistency. A new package version may be incompatible to a previous one -- and with other package you have installed. I do not think that you would want to auto-upgrade all installed packages. -- https://mail.python.org/mailman/listinfo/python-list

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

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

Re: Checking if email is valid

2023-11-02 Thread Jon Ribbens via Python-list
ot;home\""@ (Chris's host.)public.example for example? And would you be able to do anything with it if you did? -- https://mail.python.org/mailman/listinfo/python-list

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Jon Ribbens via Python-list
if the new version of bar was 2.0.0 then "pip list -o" will list it, but you should not upgrade to it.) You can do "pip install -I foo", which will pointlessly reinstall foo and then presumably upgrade bar as well, thus probably getting to the right result via a rather roundabout route, but I'm not sure if that does indeed work properly and if it is a reliable and recommended way of doing things. -- https://mail.python.org/mailman/listinfo/python-list

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