Re: Making command-line args available to deeply-nested functions

2021-08-21 Thread George Fischhof
Loris Bennett ezt írta (időpont: 2021. aug. 20., P 17:54): > Julio Di Egidio writes: > > > On Friday, 20 August 2021 at 11:54:00 UTC+2, Loris Bennett wrote: > >> Hi, > >> > >> TL;DR: > >> > >> If I have a command-line argument for a program, what is the best way > >> of making this available to

Re: on perhaps unloading modules?

2021-08-21 Thread Hope Rouselle
Greg Ewing writes: > On 21/08/21 1:36 pm, Hope Rouselle wrote: >> I wish I could restrict their syntax too, though, but I fear that's >> not possible. For instance, it would be very useful if I could >> remove loops. > > Actually you could, using ast.parse to get an AST and then walk > it lookin

Re: on perhaps unloading modules?

2021-08-21 Thread Greg Ewing
On 21/08/21 1:36 pm, Hope Rouselle wrote: I wish I could restrict their syntax too, though, but I fear that's not possible. For instance, it would be very useful if I could remove loops. Actually you could, using ast.parse to get an AST and then walk it looking for things you don't want to all

sting to list of enums

2021-08-21 Thread Josef Kleber
Hi, I need to configure a script with a command line switch and/or environment variable (-> string) to a list of enums. I found the following to work: from enum import Enum class Provider(Enum): NONE = 0, '' Amazon = 40, 'Amazon' Netflix = 42, 'Netflix' SkyTicket = 104, 'Sky Tick

tkinter

2021-08-21 Thread Tony Genter
Tkinter stopped working overnight from 8/20/2021 to 8/21/2021. Last night I was working on tutorials to work on a GUI and this morning every file that uses tkinter is broken stating that no module `tkinter' exists. Please let me know if there is some sort of problem. I am removing

Re: on perhaps unloading modules?

2021-08-21 Thread Chris Angelico
On Sun, Aug 22, 2021 at 4:37 AM Hope Rouselle wrote: > > Greg Ewing writes: > > > On 21/08/21 1:36 pm, Hope Rouselle wrote: > >> I wish I could restrict their syntax too, though, but I fear that's > >> not possible. For instance, it would be very useful if I could > >> remove loops. > > > > Actu

Re: basic auth request

2021-08-21 Thread Martin Di Paola
While it is correct to say that Basic Auth without HTTPS is absolutely insecure, using Basic Auth *and* HTTPS is not secure either. Well, the definition of "secure" depends of your threat model. HTTPS ensures encryption so the content, including the Basic Auth username and password, is secret

Re: basic auth request

2021-08-21 Thread Chris Angelico
On Sun, Aug 22, 2021 at 4:55 AM Martin Di Paola wrote: > > While it is correct to say that Basic Auth without HTTPS is absolutely > insecure, using Basic Auth *and* HTTPS is not secure either. > > Well, the definition of "secure" depends of your threat model. Yes. Which makes statements like "not

Re: on perhaps unloading modules?

2021-08-21 Thread Hope Rouselle
Chris Angelico writes: > On Sun, Aug 22, 2021 at 4:37 AM Hope Rouselle wrote: >> >> Greg Ewing writes: >> >> > On 21/08/21 1:36 pm, Hope Rouselle wrote: >> >> I wish I could restrict their syntax too, though, but I fear that's >> >> not possible. For instance, it would be very useful if I coul

Re: tkinter

2021-08-21 Thread Alan Gauld via Python-list
On 21/08/2021 19:37, Tony Genter wrote: >Tkinter stopped working overnight from 8/20/2021 to 8/21/2021. Last night >I was working on tutorials to work on a GUI and this morning every file >that uses tkinter is broken stating that no module `tkinter' exists. Are you sure you were runni

Re: Python and Ubuntu versions

2021-08-21 Thread Peter J. Holzer
On 2021-07-23 15:17:59 +1000, Cameron Simpson wrote: > On 23Jul2021 07:54, אורי wrote: > >I have a production server with Ubuntu 18.04 LTS (currently upgraded to > >Ubuntu 18.04.5 LTS) and I use Python in virtualenv - currently Python > >3.6.9. I'm using Django and I read that from Django 4.0, a m

Re: Cyclic imports

2021-08-21 Thread Dan Stromberg
On Tue, Aug 17, 2021 at 11:20 AM Chris Angelico wrote: > The main advantage of ast.parse() is that it no longer cares about > code layout, and it won't be fooled by an import statement inside a > docstring, or anything like that. It's also pretty easy to handle > multiple variants (note how "impo

Re: Cyclic imports

2021-08-21 Thread Dan Stromberg
On Sat, Aug 21, 2021 at 3:35 PM Dan Stromberg wrote: > On Tue, Aug 17, 2021 at 11:20 AM Chris Angelico wrote: > >> The main advantage of ast.parse() is that it no longer cares about >> code layout, and it won't be fooled by an import statement inside a >> docstring, or anything like that. It's a