Re: troglodytes

2024-08-13 Thread Michael Torrie via Python-list
On 8/13/24 3:24 AM, Robin Becker via Python-list wrote: > I am clearly one of the troglodytes referred to in recent discussions around > the PSF. I've been around in python land > for far too long, my eyesight fails etc etc. > > I feel strongly that a miscarriage of justice has been made in the 3

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-23 Thread Michael Torrie via Python-list
On 12/22/23 20:16, rbowman via Python-list wrote: > On Fri, 22 Dec 2023 17:27:58 -0700, Michael Torrie wrote: > >> Using the py launcher as your Windows association with .py and.pyw files >> you can have multiple versions of python installed and everything works >> as it should, according to your

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-23 Thread Michael Torrie via Python-list
On 12/22/23 20:56, Thomas Passin via Python-list wrote: > It's just better not to make assumptions about which version of Python > will be running. Just specify it yourself when you can, and then you can > be sure. Precisely, which is why the shebang is so useful, even on Windows with py launche

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Michael Torrie via Python-list
On 12/22/23 07:02, Thomas Passin via Python-list wrote: > On my Windows 10 machine, Python scripts run without a shebang line. > Perhaps Windows 11 has added the ability to use one, but then you would > need to use the actual location of your Python executable. Yes if you associate .py or .pyw w

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-22 Thread Michael Torrie via Python-list
On 12/22/23 11:42, Thomas Passin via Python-list wrote: > There is some important context that is missing here. Python on Windows > does not normally install to that location. That is not even a Windows > path, neither by directory name nor by path separators. No, that's just the way the py la

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. > > --8<---cut here---star

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 myemail+sometext@example.domain. I like to u

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: 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 and the other options I found >

Re: Question(s)

2023-10-26 Thread Michael Torrie via Python-list
On 10/26/23 10:41, Michael Torrie wrote: > By the way you definitely can step > through MicroPython code one line at a time with a remote debugger, say > with Visual Studio Code. I meant to edit that bit out. After doing a bit more research, it appears remote debugging with MicroPython may not b

Re: Question(s)

2023-10-26 Thread Michael Torrie via Python-list
On 10/26/23 06:34, o1bigtenor wrote: > Interesting - - - - ". . . see if it runs." - - - that's the issue! > When the code is accessing sensors there isn't an easy way to > check that the code is working until one has done the all of the > physical construction. If I'm trying to control a pulsatio

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. Go through the

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 > > del short_view Why? It's just a