Re: Python 2 to 3 conversion

2024-11-30 Thread Stephen Morris
On 1/12/24 11:08, Jeffrey Walton wrote: On Sat, Nov 30, 2024 at 5:27 PM Stephen Morris wrote: On 30/11/24 23:27, Bob Marčan via users wrote: [...] The python way to isolate from the OS is to use the venv machinary. I'm guessing from your response you are not familiar with it. How to build rpm:

Re: Python 2 to 3 conversion

2024-11-30 Thread Jeffrey Walton
On Sat, Nov 30, 2024 at 5:27 PM Stephen Morris wrote: > > On 30/11/24 23:27, Bob Marčan via users wrote: > [...] > The python way to isolate from the OS is to use the venv machinary. > I'm guessing from your response you are not familiar with it. > > How to build rpm: > > python setup.py bdist_rpm

Re: Python 2 to 3 conversion

2024-11-30 Thread Stephen Morris
On 30/11/24 23:27, Bob Marčan via users wrote: On Sat, 30 Nov 2024 09:33:30 + "Barry Scott" wrote: On 30 Nov 2024, at 09:22, Tim via users wrote: On Sat, 2024-11-30 at 10:59 +1100, Stephen Morris wrote: With reference to the Fedora environment, if a package is required to be installed, wo

Re: Python 2 to 3 conversion

2024-11-30 Thread George N. White III
On Thu, Nov 21, 2024 at 1:02 AM Michael Hennebry < henne...@web.cs.ndsu.nodak.edu> wrote: > On Thu, 21 Nov 2024, Tim via users wrote: > > > Person comes along with my THIS won't do THAT. You spend some time > > diagnosing, then downloading a few months worth of updates that they > > never did (wh

Re: Python 2 to 3 conversion

2024-11-30 Thread Bob Marčan via users
On Sat, 30 Nov 2024 09:33:30 + "Barry Scott" wrote: > > On 30 Nov 2024, at 09:22, Tim via users > > wrote: > > > > On Sat, 2024-11-30 at 10:59 +1100, Stephen Morris wrote: > >> With reference to the Fedora environment, if a package is required to > >> be installed, would you recommend ins

Re: Python 2 to 3 conversion

2024-11-30 Thread Barry Scott
> On 30 Nov 2024, at 09:22, Tim via users wrote: > > On Sat, 2024-11-30 at 10:59 +1100, Stephen Morris wrote: >> With reference to the Fedora environment, if a package is required to >> be installed, would you recommend installing the repository version >> or download it with pip? > > The reco

Re: Python 2 to 3 conversion

2024-11-30 Thread Tim via users
On Sat, 2024-11-30 at 10:59 +1100, Stephen Morris wrote: > With reference to the Fedora environment, if a package is required to > be installed, would you recommend installing the repository version > or download it with pip? The recommendation always was use your distro's packaging system if you

Re: Python 2 to 3 conversion

2024-11-30 Thread Barry
> On 30 Nov 2024, at 00:00, Stephen Morris wrote: > > With reference to the Fedora environment, if a package is required to be > installed, would you recommend installing the repository version or download > it with pip? I usually use the package from fedora over install from PyPI. But if a

Re: Python 2 to 3 conversion

2024-11-29 Thread Stephen Morris
On 29/11/24 10:50, Barry wrote: On 28 Nov 2024, at 21:41, Stephen Morris wrote: Just possibly off topic here, but quite some time ago I was playing around with python and needed a package (I don't remember which one it was) that wasn't installed, so I used pip3 to do the install and it insta

Re: Python 2 to 3 conversion

2024-11-28 Thread Barry
> On 28 Nov 2024, at 21:41, Stephen Morris wrote: > > Just possibly off topic here, but quite some time ago I was playing around > with python and needed a package (I don't remember which one it was) that > wasn't installed, so I used pip3 to do the install and it installed a python > 2 vers

Re: Python 2 to 3 conversion

2024-11-28 Thread Stephen Morris
On 29/11/24 05:01, Michael Hennebry wrote: On Thu, 28 Nov 2024, Bob Mar?an wrote: On Mon, 25 Nov 2024 17:16:39 -0600 "Michael Hennebry" wrote: On Wed, 20 Nov 2024, Michael Hennebry wrote: On Tue, 19 Nov 2024, Bob Mar?an via users wrote: I am a retired Sysadmin who fully understands all th

Re: Python 2 to 3 conversion

2024-11-28 Thread Michael Hennebry
On Thu, 28 Nov 2024, Bob Mar?an wrote: On Mon, 25 Nov 2024 17:16:39 -0600 "Michael Hennebry" wrote: On Wed, 20 Nov 2024, Michael Hennebry wrote: On Tue, 19 Nov 2024, Bob Mar?an via users wrote: I am a retired Sysadmin who fully understands all the frustrations brought about by the SW inst

Re: Python 2 to 3 conversion

2024-11-27 Thread Bob Marčan via users
On Mon, 25 Nov 2024 17:16:39 -0600 "Michael Hennebry" wrote: > On Wed, 20 Nov 2024, Michael Hennebry wrote: > > > On Tue, 19 Nov 2024, Bob Mar?an via users wrote: > > > >> I am a retired Sysadmin who fully understands all the frustrations brought > >> about by the SW installation without real

Re: Python 2 to 3 conversion

2024-11-25 Thread Michael Hennebry
On Wed, 20 Nov 2024, Michael Hennebry wrote: On Tue, 19 Nov 2024, Bob Mar?an via users wrote: I am a retired Sysadmin who fully understands all the frustrations brought about by the SW installation without real control. Although only for my system, I regularly build a SW package (RPM) for SW,

Re: Python 2 to 3 conversion

2024-11-23 Thread Patrick O'Callaghan
On Sat, 2024-11-23 at 15:43 +1030, Tim via users wrote: > And there's no point trying to convince him to use a password manager, > it'd be just as chaotically unorganised, and he'd lose the password for > it...  Another friend did that, hundreds of passwords lost because the > password manager only

Re: Python 2 to 3 conversion

2024-11-23 Thread Tim via users
On Sat, 2024-11-23 at 01:39 -0500, Jeffrey Walton wrote: > Folks should be using YubiKeys or other FIDO compliant gadgets > nowadays. They provide the following security properties: > >* high entropy >* phishing resistant >* replay resistant > > Each origin (domain) uses a different a

Re: Python 2 to 3 conversion

2024-11-22 Thread Jeffrey Walton
On Fri, Nov 22, 2024 at 11:53 PM Tim via users wrote: > > Tim: > > > Don't give XYZ your Gmail password when it asks you to log-on with > > > an email address and password. Argh. > > Patrick O'Callaghan: > > Very easy to misunderstand. The site should be clear that they want > > *their* passw

Re: Python 2 to 3 conversion

2024-11-22 Thread Tim via users
Tim: > > Next biggest issue is logons. Which password for which service? No, > > don't use the same one everywhere. You've suffered the consequences of > > doing that before, why haven't you learnt? Choose something that you > > can actually type correct, but nobody else will guess. Don't give

Re: Python 2 to 3 conversion

2024-11-22 Thread Tim via users
Tim: > > Don't give XYZ your Gmail password when it asks you to log-on with > > an email address and password. Argh. Patrick O'Callaghan: > Very easy to misunderstand. The site should be clear that they want > *their* password, not your Gmail (or MS, or Facebook, or Apple, ...) > password. Un

Re: Python 2 to 3 conversion

2024-11-22 Thread Michael Hennebry
On Fri, 22 Nov 2024, Tim via users wrote: I do understand the "don't update" mentality. More by luck than expertise they've gotten something to work, and they don't want to risk changing anything. But the decision gets taken away from them when they're interacting with other things over the ne

Re: Python 2 to 3 conversion

2024-11-22 Thread Patrick O'Callaghan
On Fri, 2024-11-22 at 19:12 +1030, Tim via users wrote: > Don't give XYZ > your Gmail password when it asks you to log-on with an email address > and password.  Argh. Very easy to misunderstand. The site should be clear that they want *their* password, not your Gmail (or MS, or Facebook, or Ap

Re: Python 2 to 3 conversion

2024-11-22 Thread Tim via users
Tim: > > Person comes along with my THIS won't do THAT. You spend some time > > diagnosing, then downloading a few months worth of updates that they > > never did (which is always a slow thing, no matter how fast your > > internet is). Reboot. More downloads... Reboot. It's often all that > >

Re: Python 2 to 3 conversion

2024-11-20 Thread Michael Hennebry
On Thu, 21 Nov 2024, Tim via users wrote: Person comes along with my THIS won't do THAT. You spend some time diagnosing, then downloading a few months worth of updates that they never did (which is always a slow thing, no matter how fast your internet is). Reboot. More downloads... Reboot.

Re: Python 2 to 3 conversion

2024-11-20 Thread Tim via users
On Wed, 2024-11-20 at 19:52 -0600, Michael Hennebry wrote: > I should have been more clear: > The several hours was a lot more than > the several minutes he was expecting. I get that whenever I'm fixing something for someone, even though it's nothing like that level (reprogramming) of repair. Per

Re: Python 2 to 3 conversion

2024-11-20 Thread Michael Hennebry
On Wed, 20 Nov 2024, Bob Mar?an wrote: On Wed, 20 Nov 2024 10:48:24 -0600 "Michael Hennebry" wrote: On Tue, 19 Nov 2024, Bob Mar?an via users wrote: I am a retired Sysadmin who fully understands all the frustrations brought about by the SW installation without real control. Although only f

Re: Python 2 to 3 conversion

2024-11-20 Thread Bob Marčan via users
On Wed, 20 Nov 2024 10:48:24 -0600 "Michael Hennebry" wrote: > On Tue, 19 Nov 2024, Bob Mar?an via users wrote: > > > I am a retired Sysadmin who fully understands all the frustrations brought > > about by the SW installation without real control. Although only for my > > system, I regularly b

Re: Python 2 to 3 conversion

2024-11-20 Thread Will McDonald
On Tue, 19 Nov 2024 at 13:45, Patrick O'Callaghan wrote: > I'm attempting to convert a small Python-2 script to Python-3. Google > appears to think that the best approach is something called 2to3, but I > can't get it to work. I'm far from being a Python expert, but am at > least using a virtual

Re: Python 2 to 3 conversion

2024-11-20 Thread Michael Hennebry
On Tue, 19 Nov 2024, Bob Mar?an via users wrote: I am a retired Sysadmin who fully understands all the frustrations brought about by the SW installation without real control. Although only for my system, I regularly build a SW package (RPM) for SW, which is not in distribution. Which is actua

Re: Python 2 to 3 conversion

2024-11-20 Thread Todd Zullinger
Andras Simon wrote: > Le mar. 19 nov. 2024, 16:16, Todd Zullinger a écrit : > >> [...] >> >> ¹ I'm sure many people swear by pip, but I think it's barely >> better than running `curl ... | bash` to install things, >> which I consider to be a bad practice. > > I agree, but is there a better w

Re: Python 2 to 3 conversion

2024-11-20 Thread Todd Zullinger
Jeffrey Walton wrote: > On Tue, Nov 19, 2024 at 10:16 AM Todd Zullinger wrote: >> ¹ I'm sure many people swear by pip, but I think it's barely >> better than running `curl ... | bash` to install things, >> which I consider to be a bad practice. > > cURL never broke a system of mine, unlike pi

Re: Python 2 to 3 conversion

2024-11-20 Thread Jeffrey Walton
On Tue, Nov 19, 2024 at 10:16 AM Todd Zullinger wrote: > > Go Canes wrote: > > On Tue, Nov 19, 2024 at 8:45 AM Patrick O'Callaghan > > wrote: > >> > >> I'm attempting to convert a small Python-2 script to Python-3. > > > > How small? It might be easy to do by-hand. I.e., if it is aborting > > o

Re: Python 2 to 3 conversion

2024-11-19 Thread Go Canes
On Tue, Nov 19, 2024 at 11:57 AM Patrick O'Callaghan wrote: > > If it's genuinely small, it might be trivial to rewrite? > > You can find the script at: > > https://github.com/zepalmer/script-vdr > On line 88 put "r" in front of "'\s" -> "r'\s". That will at least get it as far as showing the he

Re: Python 2 to 3 conversion

2024-11-19 Thread Go Canes
On Tue, Nov 19, 2024 at 11:57 AM Patrick O'Callaghan wrote: > You can find the script at: > > https://github.com/zepalmer/script-vdr > > It's quite old but I found it useful with X11. I'm interested in trying > it under Wayland as a workaround for the broken session restore in > Plasma. Hopefully

Re: Python 2 to 3 conversion

2024-11-19 Thread Todd Zullinger
Patrick O'Callaghan wrote: > On Tue, 2024-11-19 at 14:01 +, Will McDonald wrote: >> On Tue, 19 Nov 2024 at 14:00, Will McDonald wrote: >> >>> On Tue, 19 Nov 2024 at 13:45, Patrick O'Callaghan >>> wrote: >>> I'm attempting to convert a small Python-2 script to Python-3. >>> >> By

Re: Python 2 to 3 conversion

2024-11-19 Thread Andras Simon
Le mar. 19 nov. 2024, 16:16, Todd Zullinger a écrit : > [...] > > ¹ I'm sure many people swear by pip, but I think it's barely > better than running `curl ... | bash` to install things, > which I consider to be a bad practice. > I agree, but is there a better way when something is not packag

Re: Python 2 to 3 conversion

2024-11-19 Thread Patrick O'Callaghan
On Tue, 2024-11-19 at 12:19 -0500, Todd Zullinger wrote: > > You can find the script at: > > > > https://github.com/zepalmer/script-vdr > > > > It's quite old but I found it useful with X11. I'm interested in trying > > it under Wayland as a workaround for the broken session restore in > > Plasma

Re: Python 2 to 3 conversion

2024-11-19 Thread Bob Marčan via users
On Tue, 19 Nov 2024 12:12:46 -0500 "Todd Zullinger" wrote: > Andras Simon wrote: > > Le mar. 19 nov. 2024, 16:16, Todd Zullinger a écrit : > > > >> [...] > >> > >> ¹ I'm sure many people swear by pip, but I think it's barely > >> better than running `curl ... | bash` to install things, > >>

Re: Python 2 to 3 conversion

2024-11-19 Thread Patrick O'Callaghan
On Tue, 2024-11-19 at 12:50 -0500, Go Canes wrote: > On Tue, Nov 19, 2024 at 11:57 AM Patrick O'Callaghan > wrote: > > You can find the script at: > > > > https://github.com/zepalmer/script-vdr > > > > It's quite old but I found it useful with X11. I'm interested in trying > > it under Wayland a

Re: Python 2 to 3 conversion

2024-11-19 Thread Go Canes
On Tue, Nov 19, 2024 at 12:43 PM Go Canes wrote: > > On Tue, Nov 19, 2024 at 11:57 AM Patrick O'Callaghan > wrote: > > > If it's genuinely small, it might be trivial to rewrite? > > > > You can find the script at: > > > > https://github.com/zepalmer/script-vdr > > > *** vdr.og 2024-11-19 12

Re: Python 2 to 3 conversion

2024-11-19 Thread Patrick O'Callaghan
On Tue, 2024-11-19 at 14:01 +, Will McDonald wrote: > On Tue, 19 Nov 2024 at 14:00, Will McDonald wrote: > > > On Tue, 19 Nov 2024 at 13:45, Patrick O'Callaghan > > wrote: > > > > > I'm attempting to convert a small Python-2 script to Python-3. > > > > > > By the way, is this script somet

Re: Python 2 to 3 conversion

2024-11-19 Thread Will McDonald
On Tue, 19 Nov 2024 at 14:00, Will McDonald wrote: > On Tue, 19 Nov 2024 at 13:45, Patrick O'Callaghan > wrote: > >> I'm attempting to convert a small Python-2 script to Python-3. >> > By the way, is this script something you can stick in a pastebin/gist or similar and share? If it's genuinely

Re: Python 2 to 3 conversion

2024-11-19 Thread Todd Zullinger
Go Canes wrote: > On Tue, Nov 19, 2024 at 8:45 AM Patrick O'Callaghan > wrote: >> >> I'm attempting to convert a small Python-2 script to Python-3. > > How small? It might be easy to do by-hand. I.e., if it is aborting > on things like "print 'something'", that just needs to be changed to > "pr

Re: Python 2 to 3 conversion

2024-11-19 Thread Andras Simon
Le mar. 19 nov. 2024, 14:45, Patrick O'Callaghan a écrit : > I'm attempting to convert a small Python-2 script to Python-3. If you recognize the good conversion (for example by reading or testing it), then ChatGPT and its ilk can do the job for you. -- _

Re: Python 2 to 3 conversion

2024-11-19 Thread Go Canes
On Tue, Nov 19, 2024 at 8:45 AM Patrick O'Callaghan wrote: > > I'm attempting to convert a small Python-2 script to Python-3. How small? It might be easy to do by-hand. I.e., if it is aborting on things like "print 'something'", that just needs to be changed to "print('something')" --

Python 2 to 3 conversion

2024-11-19 Thread Patrick O'Callaghan
I'm attempting to convert a small Python-2 script to Python-3. Google appears to think that the best approach is something called 2to3, but I can't get it to work. I'm far from being a Python expert, but am at least using a virtual environment: poc@Bree:~$ cd venv poc@Bree:~/venv$ source bin/activ