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 s

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

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

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

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

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

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 MicroP

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

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

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

Re: Is npyscreen still alive?

2023-04-24 Thread Michael Torrie
On 4/24/23 08:04, Grant Edwards wrote: > Is putty running on Windows a "modern terminal emulator" in this > context? After observing some of the local IT types work, I suspect > that will be a common use-case for the app I'm working on. Yes, Putty qualifies as a "modern terminal emulator." It

Re: Is npyscreen still alive?

2023-04-24 Thread Michael Torrie
On 4/21/23 15:57, Barry wrote: > Maybe this, recently lwn.net article, https://textual.textualize.io/ > I was planning to check it out. Textual definitely looks slick and modern. And with a modern terminal emulator it works quite well and is responsive. I'd definitely consider it for a TUI.

Re: Christoph Gohlke and compiled packages

2023-04-11 Thread Michael Torrie
On 4/11/23 11:48, Oscar Benjamin wrote: > You can hardly blame a lot of people for doing this. A seb search for > "download python" gives this as the first hit: > https://www.python.org/downloads/ Very true, but it points to the difference between how people install Python on Windows compared to

Re: Windows Gui Frontend

2023-04-02 Thread Michael Torrie
On 2023-04-02 9:09 a.m., Dietmar Schwertberger wrote: >> I've tried wxGlade but never could get into it, or wxWidgets in general. > > Which version? Up to 0.7.2 I agree. Been a long time. I was initially turned off by the event handling system of wx compared to the signals and slots of Gtk and

Re: Windows Gui Frontend

2023-04-02 Thread Michael Torrie
On 2023-04-02 9:09 a.m., Dietmar Schwertberger wrote: > That's what I hated with Qt Designer: it does not output Python code > but  a .ui file. > This was the point where I could not recommend it to anyone. Well the thing is you don't need to generate Python code at all. Qt provides a UI loader

Re: Windows Gui Frontend

2023-04-02 Thread Michael Torrie
On 4/1/23 09:37, Eryk Sun wrote: > Here are a few of the GUI toolkit libraries in common use: > > * tkinter (Tk) > * PyQt (Qt) > * PySide (Qt) > * wxPython (wxWidgets) > * PyGObject (GTK) > > tkinter is included in Python's standard library. Another good one is Kivy.

Re: Windows Gui Frontend

2023-04-02 Thread Michael Torrie
On 4/2/23 05:09, Dietmar Schwertberger wrote: > I also did evaluate all the GUI builder from time to time between > 2000 and 2016 to find one that I could recommend to colleagues, > but could not find one. Then I started contributing to wxGlade > and I can say that since a few years it's as easy

Re: Windows Gui Frontend

2023-04-01 Thread Michael Torrie
On 4/1/23 15:33, Thomas Passin wrote: > OTOH, Qt isn't free for commercial use and the OP seems to be > speculating on coming up with a product to sell at some point. Careful. That's not actually true, even though the marketing team at Qt lets people believe it is. Qt is licensed under the

Re: Rob Cliffe should stop sending me rude email messages.

2023-02-27 Thread Michael Torrie
On 2/27/23 09:17, Grant Edwards wrote: > On 2023-02-27, Michael Torrie wrote: > >> I've been putting off sending this message for days, but the list noise >> level is now to the point that it has to be said. > > Ah, I've finially realized why some of those threads hav

Re: Rob Cliffe should stop sending me rude email messages.

2023-02-27 Thread Michael Torrie
I've been putting off sending this message for days, but the list noise level is now to the point that it has to be said. Often it is better to contact someone directly and privately rather than publicly embarrass them by calling them out. You've made it clear, however, that publicly calling you

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-23 Thread Michael Torrie
On 2/23/23 01:08, Hen Hanna wrote: > Python VM is seeing an "int" object (123) (and telling me that) ... > so it should be easy to print that "int" object > What does Python VMknow ? and when does it know it ? It knows there is an object and its name and type. It knows this from

Re: why is a search thru a Tuple slower ? ---- (meaningless indentations)

2023-02-20 Thread Michael Torrie
On 2/20/23 18:01, Hen Hanna wrote: > is Comp.Lang.Python very active Fairly. Apparently the cool kids are using the Python Discourse forum. > why is a linear search thru a Tuple slower > (than thru a (corresponding) List ) ??? I cannot say,

Re: is [comprehension] the right word???

2023-02-20 Thread Michael Torrie
On 2/20/23 18:06, Hen Hanna wrote: > is [comprehension] the right word??? > > i swear i never heard the word before > getting into Python a few years ago. Seems as though the term was borrowed from formal mathematics set theory. A simple search reveals that the term "list

Re: Tuple Comprehension ???

2023-02-20 Thread Michael Torrie
On 2/20/23 20:36, Hen Hanna wrote: > For a while, i've been curious about a [Tuple Comprehension] I've never heard of a "Tuple comprehension." No such thing exists as far as I know. > So finally i tried it, and the result was a bit surprising... > > > X= [ x for x in range(10) ] > X=

Re: Precision Tail-off?

2023-02-17 Thread Michael Torrie
On 2/17/23 15:03, Grant Edwards wrote: > Every fall, the groups were again full of a new crop of people who had > just discovered all sorts of bugs in the way > implemented floating point, and pointing them to a nicely written > document that explained it never did any good. But to be fair,

Re: Precision Tail-off?

2023-02-17 Thread Michael Torrie
On 2/17/23 03:27, Stephen Tucker wrote: > Thanks, one and all, for your reponses. > > This is a hugely controversial claim, I know, but I would consider this > behaviour to be a serious deficiency in the IEEE standard. No matter how you do it, there are always tradeoffs and inaccuracies moving

Re: Precision Tail-off?

2023-02-14 Thread Michael Torrie
On 2/14/23 00:09, Stephen Tucker wrote: > I have two questions: > 1. Is there a straightforward explanation for this or is it a bug? To you 1/3 may be an exact fraction, and the definition of raising a number to that power means a cube root which also has an exact answer, but to the computer, 1/3

Re: Am I banned from Discuss forum?

2023-02-10 Thread Michael Torrie
On 2/10/23 14:10, Marco Sulla wrote: > I was banned from the mailing list and Discuss forum for a very long time. > Too much IMHO, but I paid my dues. > > Now this is my state in the forum: > - I never posted something unrespectful in the last months > - I have a limitation of three posts per

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-27 Thread Michael Torrie
On 1/25/23 19:50, Jach Feng wrote: > To me, argparse has been just a tool which I can use in a CLI app. argparse is just a tool for dealing with command-line *flags*, which are common in command-line tools. argparse interprets the command line as a bunch of flags because that's what it's

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-24 Thread Michael Torrie
On 1/23/23 18:58, Jach Feng wrote: > More pathonic, but don't work. The '--' must be at index 1:-) I'm very confused. Why are you even using argparse, since if you put -- at index 1 then argparse wont't do any argument parsing at all. If all you want is the expression on the command line, just

Re: How to make argparse accept "-4^2+5.3*abs(-2-1)/2" string argument?

2023-01-22 Thread Michael Torrie
On 1/22/23 11:44, Stefan Ram wrote: > Jach Feng writes: >> e:\Works\Python>py infix2postfix.py "-4^2+5.3*abs(-2-1)/2" > > Well, it's a nice exercise! But I only made it work for the > specific example given. I have not tested whether it always > works. Haha. Yes a nice exercise, but has

Re: A natural magnet for the craziest TKinter lovers out there

2023-01-18 Thread Michael Torrie
On 1/18/23 18:01, Dan Kolis wrote: > Hangs after maybe between 4 and 50 screen rewrites. sometimes CTRL C under > Ubuntu starts it up again. Click go rewrites al the fonts the thing can find > in a few windows Repeated. > Not sure what you mean by "screen rewrites." I ran your test

Re: Improvement to imports, what is a better way ?

2023-01-18 Thread Michael Torrie
On 1/18/23 14:42, Dan Kolis wrote: > >> I don't think you've described this. I don't know what you mean here. > > When I trace it in VSCode the imports seem like they endlessly suspend > scanning and go to other ones over and over. Like "Whats this doing ?" > Nothing to worry about there.

Re: What should go to stdout/stderr and why Python logging write everything to stderr?

2023-01-03 Thread Michael Torrie
On 1/3/23 11:45, Keith Thompson wrote: > MRAB writes: > [...] >> The purpose of stderr is to display status messages, logging and error >> messages, even user prompts, and not mess up the program's actual >> output. This is important on a *nix system where you might be piping >> the output of

Re: Fwd: About the Python

2023-01-02 Thread Michael Torrie
On 1/1/23 22:27, Ramya M wrote: > This is from JNN College of Engineering, Shimoga. we are facing some > problems while using python. Please can you resolve this issue. Without any further information on your part, we can only guess at what the problems might be. Crystal ball says that Thomas'

Re: Subject: problem activating python

2022-12-17 Thread Michael Torrie
On 12/17/22 15:45, Anne wrote: >I tried several times to install and use python for youtube views with Tor >using Youtube tutorials but I keep getting error after error. Please help >me. >regards Dimpho Given the lack of any information in your post, I can only assume you're

Re: Any PyQt developers here?

2022-10-29 Thread Michael Torrie
On 10/28/22 21:31, DFS wrote: > I found one person that said they did it but their syntax didn't work. > But it doesn't throw an error either. > > model.setData(model.index(tblRow, col), font, Qt.FontRole) I wouldn't expect that to work but it's understandable why it didn't throw an error.

Re: Quick question about CPython interpreter

2022-10-17 Thread Michael Torrie
On 10/14/22 16:25, DFS wrote: > - > this does a str() conversion in the loop > - > for i in range(cells.count()): >if text == str(ID): > break > > >

Re: Find the path of a shell command

2022-10-13 Thread Michael Torrie
On 10/11/22 22:00, Paulo da Silva wrote: > Hi! > > The simple question: How do I find the full path of a shell command > (linux), i.e. how do I obtain the corresponding of, for example, > "type rm" in command line? > > The reason: > I have python program that launches a detached rm. It works

Re: python 3.10 vs breakage

2022-08-26 Thread Michael Torrie
On 8/26/22 14:37, gene heskett wrote: > Greetings all; > > Its now become obvious that 3.10 has broken some things. I can't build > linuxcnc with it. And > Octoprint has quit talking to 3d printers, now pronterface won't buy it, > can't find a 4.0.7 > version of wxPython with it sitting there

Re: Conecting to MySQL

2022-08-14 Thread Michael Torrie
On 8/8/22 19:26, Guilherme Campos wrote: > Hello folks, > > trying to connect to MYSQL it appears the error msg below: > InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' > (111 Connection refused) > [image: conexao.png] > How can i fix that.? MySQL can listen on a local

Re: Request for assistance (hopefully not OT)

2022-05-21 Thread Michael Torrie
On 5/21/22 06:19, o1bigtenor wrote: > more useful - - - - well - - - - I don't have to wonder why 'linux' is > used as much > by the general populace as it is. The community likes to destroy > itself - - - it > is a pity - - - - the community has so much to offer. As far as community goes, the

Re: "py" command for Linux and Mac?

2022-05-20 Thread Michael Torrie
On 5/12/22 11:59, De ongekruisigde wrote: > On 2022-05-12, Mats Wichmann wrote: >> On 5/12/22 10:25, Dan Stromberg wrote: >>> Hi folks. >>> >>> I heard there's a Windows-like "py" command for Linux (and Mac?). >>> >>> I'm finally getting to porting a particular project's Python 2.7 code to >>>

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Michael Torrie
On 5/17/22 05:20, o1bigtenor wrote: > What can I do to correct this self-inflicted problem? Those are always the fun ones. Reminds me of when I was first learning Linux using Red Hat Linux 5.0 or 5.1. This was long before nice dependency-solving tools like apt. I wanted to install and run

Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-11 Thread Michael Torrie
On 3/11/22 11:03, Marco Sulla wrote: > Anyway I think I'll not install Debian, because it's LTS releases are > not long enough for me. I don't know if there's a distro based on > Debian that has a long LTS support, Ubuntu apart. Both Debian stable and Ubuntu LTS state they have a five year

Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-10 Thread Michael Torrie
On 3/10/22 12:42, Marco Sulla wrote: > PS: Is it just my impression or is there a plebiscite for Debian? A vote? No I don't think so. Not sure what you mean. The reason we're all suggesting Debian is because you specifically said you want a LTS Debian-like distro. Can't get any more

Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-10 Thread Michael Torrie
On 3/10/22 06:03, Marco Sulla wrote: > I tried Debian on a VM, but I found it too much basical. A little > example: it does not have the shortcut ctrl+alt+t to open a terminal > that Ubuntu has. I'm quite sure it's simple to add, but I'm starting > to be old and lazy... Debian has the same

Re: PSA: Linux vulnerability

2022-03-09 Thread Michael Torrie
On 3/9/22 13:05, Marco Sulla wrote: > So my laziness pays. I use only LTS distros, and I update only when > there are security updates. > PS: any suggestions for a new LTS distro? My Lubuntu is reaching its > end-of-life. I prefer lightweight debian-like distros. Maybe Debian itself? --

Re: Best way to check if there is internet?

2022-02-07 Thread Michael Torrie
On 2/7/22 12:51, Chris Angelico wrote: > Some day, we'll have people on Mars. They won't have TCP connections - > at least, not unless servers start supporting connection timeouts > measured in minutes or hours - but it wouldn't surprise me if some > sort of caching proxy system is deployed. > >

Re: Inkscape

2022-01-10 Thread Michael Torrie
On 1/10/22 8:27 AM, Mandy and Michael Wilson via Python-list wrote: > I wonder if you can help me out please. I have recently added an > extension into Inkscape called Axidraw which should enable me to > hatchfill text, unforunately I am unable to use this facility as when I > open a canvas in

Re: pyinstaller wrong classified as Windows virus

2021-11-25 Thread Michael Torrie
On 11/25/21 9:08 AM, Ulli Horlacher wrote: > I cannot submit my executables, because the Windows Virus scannners > deletes them as soon as I compile my program! I forgot to post this link:

Re: pyinstaller wrong classified as Windows virus

2021-11-25 Thread Michael Torrie
On 11/25/21 9:08 AM, Ulli Horlacher wrote: > I cannot submit my executables, because the Windows Virus scannners > deletes them as soon as I compile my program! Add an exclusion rule to your machine. While this is not an option for your end users, this will certainly allow you to work on the

Re: pyinstaller wrong classified as Windows virus

2021-11-25 Thread Michael Torrie
On 11/25/21 2:20 AM, Ulli Horlacher wrote: > When I compile my programs with pyinstaller, Windows classifies them as > virus and even deletes them! > > pyinstaller.exe --onefile --noconsole -i fex.ico fextasy.py > 187 INFO: PyInstaller: 4.7 > 187 INFO: Python: 3.10.0 > 218 INFO: Platform:

Re: About get_axes() in Pandas 1.2.3

2021-11-22 Thread Michael Torrie
On 11/22/21 2:03 AM, Mahmood Naderan via Python-list wrote: > Hi > > I asked a question some days ago, but due to the lack of minimal > producing code, the topic got a bit messy. So, I have decided to ask > it in a new topic with a clear minimum code. > import pandas as pd > import csv,sys >

Re: get_axes not present?

2021-11-21 Thread Michael Torrie
On 11/19/21 10:38 AM, Mahmood Naderan wrote: >> And what is the result of plot()?  Is it a valid object, or is it None? > > Well the error happens on the plot() line. I tried to print some information > like this: > > Any thoughts on that? It's not really possible for us to know what is

Re: get_axes not present?

2021-11-18 Thread Michael Torrie
On 11/18/21 10:54 AM, Mahmood Naderan via Python-list wrote: > As you can see I put the result of plot() to ax1 and then use some functions, > e.g. set_ylabel(). And what is the result of plot()? Is it a valid object, or is it None? -- https://mail.python.org/mailman/listinfo/python-list

Re: Request to advise error for python.

2021-10-15 Thread Michael Torrie
On 10/15/21 5:37 PM, 정성학(대학원생-자동차IT융합전공) via Python-list wrote: > Dear Sir, > > resend request Unfortunately your message is still blank. Attachments such as screenshots are not visible to this list. Whenever you ask questions on the list it is helpful to: - state the operating system you are

Re: spyder does not work under root! [linux]

2021-10-13 Thread Michael Torrie
On 10/13/21 12:09 PM, Paulo da Silva wrote: > spyder and eric are both python editors/debuggers! Why are they related > with web browsers?! Good point. I was going off of the chromium bug report. My bad. I mistook Spyder for Selenium, which is a web scraping scripting engine that does use a real

Re: spyder does not work under root! [linux]

2021-10-11 Thread Michael Torrie
On 10/8/21 4:32 PM, Paulo da Silva wrote: > Às 22:56 de 08/10/21, Paulo da Silva escreveu: >> Hi! >> >> I need to debug a python3 script under root. I tried spyder but it does >> not work. >> >> Running as root without --no-sandbox is not supported. See >> https://crbug.com/638180. >> >> Thanks

Re: argparse: delimiter for argparse list arguments

2021-08-03 Thread Michael Torrie
On 8/2/21 1:43 PM, Sven R. Kunze wrote: > Hi everyone, > > maybe, I am missing something here but is it possible to specify a > delimiter for list arguments in argparse: > > https://docs.python.org/3/library/argparse.html > > Usually, '--' is used to separate two lists (cf. git). I've not

Re: curses apps on MS Windows?

2021-06-14 Thread Michael Torrie
On 6/13/21 11:44 AM, Grant Edwards wrote: > There's been a surprising amount of discussion lately about using > curses libraries on Windows OS. I'm surprised by this, because I don't > think I've ever even seen a Windows curses application. > > Are there examples of popular curses applications

Re: learning python ...

2021-05-28 Thread Michael Torrie
On 5/27/21 12:29 PM, hw wrote: > When the idea is to learn something, it's not exactly helpful to abandon > that idea when encountering the first obstacle or when someone tells you > you don't like it as much as they do ... We've had many new users approach the mailing list over the years.

Re: imaplib: is this really so unwieldy?

2021-05-27 Thread Michael Torrie
On 5/27/21 10:42 AM, hw wrote: > What do you do with it when importing it? Do you somehow design your > programs as modules in some way that makes them usable as some kind of > library funktion? Yes, precisely. Typically I break up my python projects into logical modules, which are each kind

Re: learning python ...

2021-05-25 Thread Michael Torrie
On 5/24/21 9:53 PM, hw wrote: > That seems like an important distinction. I've always been thinking of > variables that get something assigned to them, not as something that is > being assigned to something. Your thinking is not incorrect. Assignment is how you set a variable to something.

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:42 AM, Schachner, Joseph wrote: > OMG that is awful abuse of Python! You have overloaded two Python > keywords by making variables of that name. Nitpick. hw did not overload keywords. Python does not allow keywords to be overloaded. Instead hw overwrote type names. Upon learning

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:37 AM, Chris Angelico wrote: > We're talking about many different things. Indeed. The context of that original question about whether this was shadowing or not seemed to be specifically about the num=input(); num=int(num) example that Cameron Simpson posted. Although hw was not

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:21 AM, Michael Torrie wrote: > Given your posts thus far, hw, I don't think Python is a good fit for > you. You're better off learning a language that more closely aligns with > the statically-typed languages you already know. That was unnecessarily harsh; my apologies.

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:17 AM, hw wrote: > What does python actually do in the first example? Does it overshadow a > variable or does it change one? If it overshadows a variable, it would > be dubious, if it doesn't, it won't be dubious. Are you referring to this? num = input("Enter a number: ")

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:24 AM, Chris Angelico wrote: > On Tue, May 25, 2021 at 12:18 AM hw wrote: >> There are more alternatives: Python might create a new variable with >> the same name and forget about the old one. Or it doesn't forget about >> the old one and the old one becomes inaccessible (unless

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 7:34 AM, hw wrote: > Perhaps you can't see how both examples are different because you're > looking at things from a python perspective. Sorry but they aren't all that different. In both cases you're shadowing printf. The difference is that C is a statically-typed, compiled

Re: Python install failing. Install log is available.

2021-05-21 Thread Michael Torrie
On 5/21/21 8:25 AM, Mats Wichmann wrote: > An install for all users will drop it into someplace different - by > default at the top of the drive, so e.g. C:\Python39. I just did an install of 3.9 on Windows 10. There was an option to install the launcher for all users but no option for

Re: OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-09 Thread Michael Torrie
On 5/9/21 11:26 AM, Abdur-Rahmaan Janhangeer wrote: > Out of curiosity, how do people without a Code of Conduct > manage and prevent abuse in between people? I was about > to organise something last year but did not find a better solution > than a code of conduct to ensure smoothness. Well the

Re: OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-08 Thread Michael Torrie
On 5/8/21 6:23 PM, Jason C. McDonald wrote: > Usually, I find when people dump on CoCs, they're just angry at > accountability. I haven't known anyone yet who was a productive > member of Python and opposed to the CoC, at least in principle > and aim. I disagree. Many people are opposed to CoCs

Re: OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-08 Thread Michael Torrie
On 5/8/21 3:28 PM, Mirko via Python-list wrote: > > I apologize for this OT post, especially because it's in reply to an > at least partly troll post, but I just can't resist. Sorry. > > P.S.: *NOT* among the core symptoms of (the high-functioning levels) > of ASS is the inability to learn. Mind

Re: Bloody rubbish

2021-05-06 Thread Michael Torrie
On 5/5/21 8:58 PM, Joe Pfeiffer wrote: > Mr Flibble writes: > >> Python is slow and significant whitespace is patently absurd. > > Why am I not surprised to learn your "fast" implementation turns out to > be something other than python? And it's bizarre that the OP, since he despises Python so

Re: library not initialized (pygame)

2021-05-02 Thread Michael Torrie
On 5/2/21 1:23 PM, Quentin Bock wrote: > the error apparently comes from the first instructions variable saying > library not initialized not sure why, its worked before but not now :/ I don't get that error on my Fedora 32 machine. The script ultimately doesn't run because it can't find the

Re: cant use certain commands, leading to more problems

2021-04-28 Thread Michael Torrie
On 4/28/21 4:00 AM, Rasig Kosonmontri wrote: > so i heard that the microsoft store's version of python tends to hide > itself. and so i uninstalled it > but when i typed in to a powershell it just directs me to the > mircrosoft store's page > i then disabled it from doing that and install python

Re: Are there Python modules that allow a program to write to the screen?

2021-04-26 Thread Michael Torrie
On 4/26/21 12:38 AM, Stephen Tucker wrote: > Hi, > > I have old software written in GWBASIC that I use to plot diagrams on the > screen. > > In Windows 10, I have to resort to using the DOSBox emulator to run it. > > I would dearly like to re-write it in Python - ideally Python 2.7. > > What,

Re: question about basics of creating a PROXY to MONITOR network activity

2021-04-10 Thread Michael Torrie
On 4/10/21 8:52 AM, cseb...@gmail.com wrote: > >> Is it even possible to be secure in that way? This is, by definition, >> a MITM, and in order to be useful, it *will* have to decrypt >> everything. So if someone compromises the monitor, they get >> everything. > > Chris > > I hear all your

Re: firewall in python

2021-03-28 Thread Michael Torrie
On 3/28/21 12:33 PM, Quentin Bock wrote: > Is it possible to create a firewall inside python and then run that instead > of the windows defender firewall? If so how would that work or how would > that be made? Probably not. The firewall is part of the kernel since it works directly with the

Re: python documentation

2021-03-28 Thread Michael Torrie
On 3/28/21 12:28 PM, Michael Torrie wrote: > You want to use an obsolete version of Python and an obsolete version of > Qt. That's totally fine! But why are you angry when people, who are > strictly volunteers, are unable to help much here other than to strongly > recommend you recon

Re: python documentation

2021-03-28 Thread Michael Torrie
On 3/27/21 1:02 PM, pyt...@blackward.eu wrote: > You say: "The point is that there are those who use Python 2 and > don't want to move to Python 3, claiming that it's easier to switch > from Python 2 to some other language than from Python 2 to Python 3. > That's what seems questionable." And I

Re: convert script awk in python

2021-03-26 Thread Michael Torrie
On 3/25/21 1:14 AM, Loris Bennett wrote: > Does any one have a better approach? Not as such. Running a command and parsing its output is a relatively common task. Years ago I wrote my own simple python wrapper function that would make it easier to run a program with arguments, and capture its

Re: port to PDOS (especially mainframe)

2021-03-23 Thread Michael Torrie
On 3/23/21 5:19 AM, Paul Edwards wrote: > Thanks for the tip. I don't actually need it to be > light. I just need it to be C90-compliant. I guess the point with MicroPython is that since it can build on all sorts of microcontrollers, a) it has a simpler build system and b) it is definitely

Re: New Python implementation

2021-02-16 Thread Michael Torrie
On 2/16/21 10:58 AM, Ben Bacarisse wrote: > Attempts at a universal compiler stalled in the 1980s (though there may > have been some new developments since I stopped looking) because > expressing the semantics of different languages is so very hard. In > fact, much of the interest in pursuing the

Re: Pyautogui troubles

2021-01-31 Thread Michael Torrie
On 1/30/21 2:58 PM, Philipp Daher via Python-list wrote: > Dear Python-Team, > > I have just repaired python after running my program which imports pyautogui, > closing and reopening it and then getting this: ModuleNotFoundError: No > module named „pyautogui“. Repairing didn’t work and I still

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-27 Thread Michael Torrie
On 1/27/21 11:42 AM, C W wrote: > For learning purposes, here's the files: > https://www.dropbox.com/sh/a3iy40rcvib4uvj/AAADmlM2i6NquWC1SV0nZfnDa?dl=0 > > Yes, you are correct about "employee" and "person" discrepancies. For now, > the list comprehension is where I get stuck. > > I'd like to

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-27 Thread Michael Torrie
On 1/26/21 10:19 PM, C W wrote: > Traceback (most recent call last): >File "/Users/Mike/Documents/Mike/main.py", line 95, in > main() >File "/Users/Mike/Documents/Mike/main.py", line 86, in main > args = get_feed() >File "/Users/Mike/DocumentsMike/main.py", line 32, in

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-26 Thread Michael Torrie
On 1/26/21 8:30 PM, Grant Edwards wrote: > Me too (MS in CSci), but I can't remember the last time I used a > debugger. I use a debugger frequency in C++, and sometimes C. Even running a debugger on an attached device like an Arduino is sometimes very useful. Good debuggers let you do things

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-26 Thread Michael Torrie
On 1/26/21 8:37 PM, C W wrote: > I have a naive question. How do I use traceback or trace the stack? In > particular, I'm using VS Code with Python interactive console. Show us the traceback here and we can help you interpret it. Copy and paste it from the VS Code console. > Say, I want to

Re: Issues with running python in Command prompt

2021-01-20 Thread Michael Torrie
On 1/19/21 10:40 PM, Mladen Gogala via Python-list wrote: > I generally advise > using Cygwin and installing the Cygwin version of Python. Your OS will > look like a POSIX compatible system, and you will be able to use Unix/ > Linux tools like bash, less. vi, awk, grep and alike. You will also be

Re: Which method to check if string index is queal to character.

2020-12-28 Thread Michael Torrie
On 12/28/20 1:27 PM, Richard Damon wrote: > Validating that it meets the SYNTAX of an email address isn't THAT hard, > but there are a number of edge cases to worry about. Yes one would think that, but in my experience half of all web sites get it wrong, insisting that my perfectly valid and

Re: Which method to check if string index is queal to character.

2020-12-28 Thread Michael Torrie
On 12/28/20 10:46 AM, Marco Sulla wrote: > On Mon, 28 Dec 2020 at 17:37, Bischoop wrote: >> >> I'd like to check if there's "@" in a string and wondering if any method >> is better/safer than others. I was told on one occasion that I should >> use is than ==, so how would be on this example. >>

Re: Which method to check if string index is queal to character.

2020-12-28 Thread Michael Torrie
On 12/28/20 10:37 AM, Bischoop wrote: > A valid email address consists of an email prefix and an email domain, > both in acceptable formats. The prefix appears to the left of the @ symbol. > The domain appears to the right of the @ symbol. > For example, in the address exam...@mail.com, "example"

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Michael Torrie
On 12/22/20 9:44 AM, Chris Green wrote: > I have it running on 20.04 (with a couple of compatibility packages > from a PPA) but I know I start hitting problems as soon as I move to > 20.10. So that does sound like an excellent idea. Where can I find > information about building container type

Re: Installing Python (2.7) 'by hand' on Ubuntu - possible?

2020-12-22 Thread Michael Torrie
On 12/22/20 8:10 AM, Chris Green wrote: > I have (as discussed here) a printer utility that uses Python 2 and I > can't update it to Python 3 because it has a .so library file which is > compiled for Python 2. I think I have exhausted all the possibilities > for converting it to Python 3 so now

Re: Review, suggestion etc?

2020-12-17 Thread Michael Torrie
On 12/17/20 9:10 AM, Bischoop wrote: > Could you expand here, I rather don't know how I could do it different > way apart from if maritals == 'Yes' or maritals == 'No' or is it what > you meant? I think he's hinting at using a loop instead. while maritals != 'Yes' and maritals != 'No':

Re: Error

2020-12-07 Thread Michael Torrie
On 12/7/20 11:30 AM, MRAB wrote: > There's no need to remove Python 3.9 first; Python 3.8 can be installed > alongside it. Since the original poster is invoking python.exe directly, probably as per the instructions in the book he's following, I fear having two versions of python installed will

  1   2   3   4   5   6   7   8   9   10   >