Re: Lazy Imports -- I Like This Idea

2026-03-28 Thread DFS via Python-list
On 3/25/2026 9:40 PM, Lawrence D’Oliveiro wrote: So Python 3.15 will introduce a new, “lazy” import mechanism . So far I have done one script where I moved an import into the function where it was used, instead of doing it globally; this reduced the script sta

Re: Lazy Imports -- I Like This Idea

2026-03-28 Thread Gregg Drennan via Python-list
Yes, you would incur the delay when the package is finally imported. But consider the case where you are importing multiple packages, all at start-up. For this example, say there are four import which take ½ second each. This would add 2 seconds to the start-up. Very noticeable by the user. If th

Re: Lazy Imports -- I Like This Idea

2026-03-28 Thread Piergiorgio Sartor
On 28/03/2026 05.59, DFS wrote: [...] Faster startup is nice, but lazy importing doesn't reduce total runtime of the program, right? Different objective, anyway. It *might* reduce total runtime, it depends on the code structure. If the code is multi-threaded, likely having the imports *per th

installing 3.10.9 to run old scripts on windows 11

2026-03-28 Thread Mark Mattson via Python-list
Hello python, I downloaded some python scripts pymovie and pyote from iota and followed instructions to get the older version of python to run on my windows 11 machine. If I run python from cmd line it jumps to a store window for python installation. If I hit start and run python from there it

Re: Lazy Imports -- I Like This Idea

2026-03-28 Thread Oscar Benjamin via Python-list
On Sat, 28 Mar 2026 at 14:13, DFS via Python-list wrote: > > On 3/25/2026 9:40 PM, Lawrence D’Oliveiro wrote: > > > So Python 3.15 will introduce a new, “lazy” import mechanism > > . > > > > So far I have done one script where I moved an import into the > > funct

Re: installing 3.10.9 to run old scripts on windows 11

2026-03-28 Thread Thomas Passin
On 3/28/2026 12:13 AM, Mark Mattson via Python-list wrote: Hello python, I downloaded some python scripts pymovie and pyote from iota and followed instructions to get the older version of python to run on my windows 11 machine. If I run python from cmd line it jumps to a store window for pyth