Re: Where I do ask for a new feature

2023-10-20 Thread Roel Schroeven via Python-list
Op 20/10/2023 om 5:16 schreef Bongo Ferno via Python-list: On Thursday, October 19, 2023 at 11:26:52 PM UTC-3, avi.e...@gmail.com wrote: > There are many ways to make transient variables that disappear at some time > and do we need yet another? Yes, you can create one of those ways bu

Re: Simple webserver

2023-10-20 Thread Janis Papanagnou via Python-list
e time implementing the server. :-) Janis -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple webserver

2023-10-20 Thread Chris Angelico via Python-list
On Fri, 20 Oct 2023 at 22:31, Janis Papanagnou via Python-list wrote: > > On 19.10.2023 01:23, Chris Angelico wrote: > > > > Broadly speaking, your ideas are great. Any programming language CAN > > be used for the server (and I've used several, not just Python). >

Re: Where I do ask for a new feature

2023-10-20 Thread Thomas Passin via Python-list
On 10/19/2023 11:16 PM, Bongo Ferno via Python-list wrote: On Thursday, October 19, 2023 at 11:26:52 PM UTC-3, avi.e...@gmail.com wrote: There are many ways to make transient variables that disappear at some time and do we need yet another? Yes, you can create one of those ways but what is the

Re: Simple webserver

2023-10-20 Thread De ongekruisigde via Python-list
On 2023-10-20, Chris Angelico wrote: > On Fri, 20 Oct 2023 at 22:31, Janis Papanagnou via Python-list > wrote: >> >> On 19.10.2023 01:23, Chris Angelico wrote: >> > >> > Broadly speaking, your ideas are great. Any programming language CAN >> > be us

RE: Where I do ask for a new feature

2023-10-20 Thread AVI GROSS via Python-list
volved is not a big deal. Python is an interpreted language that makes one pass but there are languages that make multiple passes through the code and allow things like defining a function after it has been called. That is not pythonic. -Original Message----- From: Python-list On Behalf O

Re: Where I do ask for a new feature

2023-10-20 Thread Michael Torrie via Python-list
On 10/19/23 19:32, Bongo Ferno via Python-list wrote: > >> You can actually just do that with simple assignment! >> >> short_view = my_object.stuff.long_stuff.sub_object >> print(short_view.some_method()) > > but then have to delete the variable manually >

Running a subprocess in a venv

2023-10-21 Thread Larry Martell via Python-list
/listinfo/python-list

Re: Running a subprocess in a venv

2023-10-21 Thread Johannes Findeisen via Python-list
On Sat, 21 Oct 2023 09:01:18 -0400 Larry Martell via Python-list wrote: > I have a python script, and from that I want to run another script in > a subprocess in a venv. What is the best way to do that? I could write > a file that activates the venv then runs the script, then run th

Re: Running a subprocess in a venv

2023-10-21 Thread Roel Schroeven via Python-list
Larry Martell via Python-list schreef op 21/10/2023 om 15:01: I have a python script, and from that I want to run another script in a subprocess in a venv. What is the best way to do that? I could write a file that activates the venv then runs the script, then run that file, but that seems messy

Re: Running a subprocess in a venv

2023-10-21 Thread Larry Martell via Python-list
On Sat, Oct 21, 2023 at 9:49 AM Johannes Findeisen wrote: > > On Sat, 21 Oct 2023 09:01:18 -0400 > Larry Martell via Python-list wrote: > > > I have a python script, and from that I want to run another script in > > a subprocess in a venv. What is the best way to do t

Re: Running a subprocess in a venv

2023-10-21 Thread Johannes Findeisen via Python-list
On Sat, 21 Oct 2023 11:32:03 -0400 Larry Martell wrote: > On Sat, Oct 21, 2023 at 9:49 AM Johannes Findeisen > wrote: > > > > On Sat, 21 Oct 2023 09:01:18 -0400 > > Larry Martell via Python-list wrote: > > > > > I have a python script, and from that

Re: Running a subprocess in a venv

2023-10-21 Thread Larry Martell via Python-list
On Sat, Oct 21, 2023 at 12:10 PM Johannes Findeisen wrote: > > On Sat, 21 Oct 2023 11:32:03 -0400 > Larry Martell wrote: > > > On Sat, Oct 21, 2023 at 9:49 AM Johannes Findeisen > > wrote: > > > > > > On Sat, 21 Oct 2023 09:01:18 -0400 > > > La

Re: Running a subprocess in a venv

2023-10-21 Thread Thomas Passin via Python-list
On 10/21/2023 11:32 AM, Larry Martell via Python-list wrote: On Sat, Oct 21, 2023 at 9:49 AM Johannes Findeisen wrote: On Sat, 21 Oct 2023 09:01:18 -0400 Larry Martell via Python-list wrote: I have a python script, and from that I want to run another script in a subprocess in a venv. What

Re: Simple webserver

2023-10-21 Thread Janis Papanagnou via Python-list
e I'm lacking experience. And that lead me to have a look at Python, since the web-sockets/server examples that I found looked simple.) Janis -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple webserver

2023-10-21 Thread Chris Angelico via Python-list
On Sun, 22 Oct 2023 at 04:13, Janis Papanagnou via Python-list wrote: > I have a couple decades experience with about a dozen programming > languages (not counting assemblers). Asynchronous processing, IPC, > multi-processing, client/server architectures, multi-threading, > semaphor

Re: Running a subprocess in a venv

2023-10-21 Thread Mats Wichmann via Python-list
On 10/21/23 07:01, Larry Martell via Python-list wrote: I have a python script, and from that I want to run another script in a subprocess in a venv. What is the best way to do that? I could write a file that activates the venv then runs the script, then run that file, but that seems messy. Is

Cheetah 3.3.3

2023-10-22 Thread Oleg Broytman via Python-list
}] How are you feeling? #for $person in $people $person['name'] is $person['mood'] #end for Oleg. -- Oleg Broytman https://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. -- https://mail.python.org/mailman/listinfo/python-list

return type same as class gives NameError.

2023-10-22 Thread Antoon Pardon via Python-list
T'? Can someone explain what I am doing wrong? -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple webserver

2023-10-22 Thread Dieter Maurer via Python-list
, low latency Depending on your requirements, other web servers might be preferable. -- https://mail.python.org/mailman/listinfo/python-list

Re: return type same as class gives NameError.

2023-10-22 Thread Cameron Simpson via Python-list
This message: NameError: name 'Pnt' is not defined. Did you mean: 'PNT'? is unfortunate, because you have a very similar "PNT" name in scope. But it isn't what you want. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Question(s)

2023-10-24 Thread Dom Grigonis via Python-list
hy (at least from my perspective) working in unix environment is so much more pleasant. https://en.wikipedia.org/wiki/Unix_philosophy <https://en.wikipedia.org/wiki/Unix_philosophy> Regards, DG > On 24 Oct 2023, at 15:22, o1bigtenor via Python-list > wrote: > > Greetings &g

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: python-list@python.o

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
> 953433230 > > The above works because in CPython list.sort() currently uses only the < > operator; adding __gt__() and __eq__() to make this portable is > straightforward even if you do not use the functools.total_ordering class > decorator. 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)`? -- https://mail.python.org/mailman/listinfo/python-list

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
potential to be of value. It's all a question of how much time it saves with earlier detection of bugs versus how much it costs you in pacifying the tool. Some are better than others. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

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
development. Search for other alternatices. -- https://mail.python.org/mailman/listinfo/python-list

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
uot; in my favorite search engine (=> "ecosia.org") and the second hit gave: "https://marketplace.eclipse.org/content/pydev-python-ide-eclipse";. -- https://mail.python.org/mailman/listinfo/python-list

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
ou use Exception. Use e.g. RuntimeException to silence it. -- https://mail.python.org/mailman/listinfo/python-list

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
ything, what do developers using Python do to try to make sure they get properly paid and others do not just use their work without permission? -Original Message- From: o1bigtenor Sent: Wednesday, October 25, 2023 6:59 AM To: avi.e.gr...@gmail.com Cc: Chris Angelico ; python-list@python.

SQLObject 3.10.3

2023-10-25 Thread Oleg Broytman via Python-list
#x27; >>> p2 = Person.get(1) >>> p2 >>> p is p2 True Queries:: >>> p3 = Person.selectBy(lname="Doe")[0] >>> p3 >>> pc = Person.select(Person.q.lname=="Doe").count() >>> pc 1 Oleg. -- Oleg Broytmanhttps://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. -- https://mail.python.org/mailman/listinfo/python-list

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: r...@zedat.fu-berlin.de (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
inding linux related information on the > website.) Not at all. As I recall, it's entirely written in Java, so basically entirely platform-independent already. -- |_|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-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
ed and new features ofteh added and just fixing one bug can break other parts so you would need to verify things over and over and then freeze. -Original Message----- From: Python-list On Behalf Of Michael F. Stemper via Python-list Sent: Wednesday, October 25, 2023 9:34 AM To: python-list@

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
if the code works and you like it the > way it is. > > pylint complains because you use Exception. Use e.g. RuntimeException to > silence it. Ingrid says it's a RuntimeError, not RuntimeException. -- https://mail.python.org/mailman/listinfo/python-list

Re: Question(s)

2023-10-26 Thread Michael Torrie via Python-list
PC? That makes a big difference in where you go to get help and what kind of help we can provide here. > Oh well - - - I am working on things! That is good. I wish you success. -- https://mail.python.org/mailman/listinfo/python-list

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
. -Original Message- From: Python-list On Behalf Of o1bigtenor via Python-list Sent: Thursday, October 26, 2023 8:34 AM To: Michael Torrie Cc: python-list@python.org Subject: Re: Question(s) On Wed, Oct 25, 2023 at 10:19 AM Michael Torrie via Python-list wrote: > > On 10/25/23

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
re this is going wrong? I thought it should be enough that the packages with the metadata is available via PYTHONPATH, but this seems not to be sufficient. So I must be overseeing something. Cheers, Loris -- This signature is currently under constuction. -- https://mail.python.org/mailman/listi

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
ame__ == "__main__": app() This is the first time I have used typer, so it is more than likely that I have made some mistakes. Cheers, Loris -- This signature is currently under constuction. -- https://mail.python.org/mailman/listinfo/python-list

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
on_callback), > ): > pass > > if __name__ == "__main__": > > app() > > This is the first time I have used typer, so it is more than likely that > I have made some mistakes. OK, I worked it out. Instead of typer.echo(f"Version: {__version__}") I need typer.echo(f"Version: {mypackage.__version__}") Thanks for the help :-) Even if no-one replies, it still helps me to have to formulate the problem for an audience of people who probably know more than I do. Cheers, Loris -- This signature is currently under constuction. -- https://mail.python.org/mailman/listinfo/python-list

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Dieter Maurer via Python-list
ch as `NameError`)), look at the traceback. The traceback informs you about the calling context that led to the exception, espeically where in the code the exception occurred. If you cannot resolve the problem at your own, include the traceback in your call for assistence. -- https://mail.python.or

PyDev 11.0.2 Released

2023-10-29 Thread Fabio Zadrozny via Python-list
http://pydev.org PyDev Blog: http://pydev.blogspot.com PyDev on VSCode: http://pydev.org/vscode LiClipse: http://www.liclipse.com PyVmMonitor - Python Profiler: http://www.pyvmmonitor.com/ Cheers, Fabio Zadrozny -- https://mail.python.org/mailman/listinfo/python-list

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

<    18   19   20   21   22   23   24   25   26   27   >