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

2024-01-02 Thread Thomas Passin via Python-list
On 1/2/2024 11:56 AM, Mats Wichmann via Python-list wrote: On 1/1/24 12:53, Thomas Passin via Python-list wrote: On Windows 10, a shebang line gets ignored in favor of Python 3.9.9 (if invoked by the script name alone) or Python 3.12.1 (if invoked by the "py" launcher). fwiw, yo

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

2024-01-03 Thread Barry Scott via Python-list
> On 2 Jan 2024, at 17:24, Thomas Passin via Python-list > wrote: > > You might learn about this if you happen to read and remember the right part > of the Python docs. Otherwise you have no idea what py.exe is up to nor how > it does it. I would say that most people

Using my routines as functions AND methods

2024-01-03 Thread Guenther Sohler via Python-list
TRY(translate,"Move Object") OO_METHOD_ENTRY(right,"Right Object") Using this i can reuse all the functions as methods, but its not 100% stable/bulletproof and crashes sometimes. So there is the bug ? Is there a better approach to reach my goal ? thank you -- https://mail.python.org/mailman/listinfo/python-list

Re: Using my routines as functions AND methods

2024-01-03 Thread Alan Gauld via Python-list
On 03/01/2024 22:47, Guenther Sohler via Python-list wrote: > Hi, > > In my cpython i have written quite some functions to modify "objects". > and their python syntax is e.g.\ > > translate(obj, vec). e.g whereas obj is ALWAYS first argument. > However, I also

Re: Using my routines as functions AND methods

2024-01-03 Thread Thomas Passin via Python-list
On 1/3/2024 11:17 PM, Thomas Passin wrote: On 1/3/2024 8:00 PM, Alan Gauld via Python-list wrote: On 03/01/2024 22:47, Guenther Sohler via Python-list wrote: Hi, In my cpython i have written quite some functions to modify "objects". and their python syntax is e.g.\ translate(obj,

Re: Using my routines as functions AND methods

2024-01-03 Thread Guenther Sohler via Python-list
PyOpenSCADMethods[] = { > OO_METHOD_ENTRY(translate,"Move Object") > OO_METHOD_ENTRY(right,"Right Object") > > Using this i can reuse all the functions as methods, > but its not 100% stable/bulletproof and crashes sometimes. > So there is the bug ? > Is there a better approach to reach my goal ? > > > thank you > > -- https://mail.python.org/mailman/listinfo/python-list

Re: Using my routines as functions AND methods

2024-01-04 Thread Thomas Passin via Python-list
On 1/3/2024 8:00 PM, Alan Gauld via Python-list wrote: On 03/01/2024 22:47, Guenther Sohler via Python-list wrote: Hi, In my cpython i have written quite some functions to modify "objects". and their python syntax is e.g.\ translate(obj, vec). e.g whereas obj is ALWAYS firs

Re: Using my routines as functions AND methods

2024-01-04 Thread Alan Gauld via Python-list
On 04/01/2024 04:17, Thomas Passin via Python-list wrote: >> I'm probably missing something obvious here but can't you >> just assign your function to a class member? >> >> def myFunction(obj, ...): ... >> >> class MyClass: >> myMethod = m

Re: Using my routines as functions AND methods

2024-01-04 Thread Guenther Sohler via Python-list
ot;Move Object") > OO_METHOD_ENTRY(right,"Right Object") > > Using this i can reuse all the functions as methods, > but its not 100% stable/bulletproof and crashes sometimes. > So there is the bug ? > Is there a better approach to reach my goal ? > > > thank you > > -- https://mail.python.org/mailman/listinfo/python-list

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

2024-01-07 Thread Sibylle Koczian via Python-list
Am 01.01.2024 um 12:50 schrieb Barry via Python-list: On 1 Jan 2024, at 11:14, Sibylle Koczian via Python-list wrote: But in all this thread I didn't see a single explanation for my current situation: one and the same shebang line works on Windows 10 / Python 3.11 and doesn'

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

2024-01-09 Thread Barry Scott via Python-list
> On 7 Jan 2024, at 15:09, Sibylle Koczian via Python-list > wrote: > > Oh, and the two Windows and Python versions are on two different computers. > > Will remove the "/env" from my shebang lines, even if I don't understand > what's happening.

extend behaviour of assignment operator

2024-01-10 Thread Guenther Sohler via Python-list
ctive code should be: a=cube([10,1,1]) a.name='a' b=a b.name='b' # i am aware that a.name also changes can decorators also be used with assignment operators ? thank you for your hints -- https://mail.python.org/mailman/listinfo/python-list

Re: extend behaviour of assignment operator

2024-01-10 Thread Dieter Maurer via Python-list
k): v = super().__getattribute__(k) try: v.name = k except TypeError: pass return v ``` -- https://mail.python.org/mailman/listinfo/python-list

Extract lines from file, add to new files

2024-01-11 Thread Rich Shepard via Python-list
t experience. TIA, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-11 Thread Rich Shepard via Python-list
On Thu, 11 Jan 2024, MRAB via Python-list wrote: From the look of it: 1. If the line is empty, ignore it. 2. If the line contains "@", it's an email address. 3. Otherwise, it's a name. MRAB, Thanks. I'll take it from here. Regards, Rich -- https://mail.python.or

Re: Extract lines from file, add to new files

2024-01-11 Thread Mats Wichmann via Python-list
On 1/11/24 11:27, MRAB via Python-list wrote: On 2024-01-11 18:08, Rich Shepard via Python-list wrote: It's been several years since I've needed to write a python script so I'm asking for advice to get me started with a brief script to separate names and email addresses in on

Re: Extract lines from file, add to new files

2024-01-11 Thread Rich Shepard via Python-list
On Thu, 11 Jan 2024, Mats Wichmann via Python-list wrote: 4. Don't assume it's going to be "plain text" if the email info is harvested from external sources (like incoming emails) - you'll end up stumbling over a 誰かのユーザー from somewhere. Process as bytes, or be r

Re: Extract lines from file, add to new files

2024-01-11 Thread Piergiorgio Sartor via Python-list
bash script for all? bye, -- piergiorgio -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-11 Thread Rich Shepard via Python-list
On Thu, 11 Jan 2024, Piergiorgio Sartor via Python-list wrote: Why not to use bash script for all? Piergiorgio, That's certainly a possibility, and may well be better than python for this task. Thank you, Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-11 Thread Thomas Passin via Python-list
On 1/11/2024 1:27 PM, MRAB via Python-list wrote: On 2024-01-11 18:08, Rich Shepard via Python-list wrote: It's been several years since I've needed to write a python script so I'm asking for advice to get me started with a brief script to separate names and email addresses in on

Re: Extract lines from file, add to new files

2024-01-11 Thread Left Right via Python-list
s/python/./split_emails.py", line 1, in with (open('example.txt', 'r'), open('emails.txt', 'w'), open('salutations.txt', 'w')) as e, m, s: TypeError: 'tuple' object does not support the context manager protocol It seems t

Re: Extract lines from file, add to new files

2024-01-11 Thread Left Right via Python-list
t;/home/?/doodles/python/./split_emails.py", line 1, in > with (open('example.txt', 'r'), open('emails.txt', 'w'), > open('salutations.txt', 'w')) as e, m, s: > TypeError: 'tuple' object does not support the cont

Re: Extract lines from file, add to new files

2024-01-11 Thread Chris Angelico via Python-list
On Fri, 12 Jan 2024 at 08:56, Left Right via Python-list wrote: > > By the way, in an attempt to golf this problem, I discovered this, > which seems like a parser problem: When you jump immediately to "this is a bug", all you do is make yourself look like an idiot. Unsurprisi

Re: Extract lines from file, add to new files

2024-01-11 Thread Grizzy Adams via Python-list
Thursday, January 11, 2024 at 10:44, Rich Shepard via Python-list wrote: Re: Extract lines from file, add to (at least in part) >On Thu, 11 Jan 2024, MRAB via Python-list wrote: >> From the look of it: >> 1. If the line is empty, ignore it. >> 2. If the line contains "

Re: mypy question

2024-01-12 Thread Antoon Pardon via Python-list
Op 29/12/2023 om 16:02 schreef Karsten Hilbert via Python-list: Am Fri, Dec 29, 2023 at 07:49:17AM -0700 schrieb Mats Wichmann via Python-list: I am not sure why mypy thinks this gmPG2.py:554: error: Argument "queries" to "run_rw_queries" has incompatible type

RE: Extract lines from file, add to new files

2024-01-12 Thread AVI GROSS via Python-list
ng done in a vectoried manner might be faster than an array of objects, but is more often a sign of poor code. -Original Message- From: Python-list On Behalf Of Grizzy Adams via Python-list Sent: Friday, January 12, 2024 1:59 AM To: Rich Shepard via Python-list ; Rich Shepard Subject:

RE: Extract lines from file, add to new files

2024-01-12 Thread Rich Shepard via Python-list
On Fri, 12 Jan 2024, AVI GROSS via Python-list wrote: But is the solution a good one for some purpose? The two output files may end up being out of sync for all kinds of reasons. One of many "errors" can happen if multiple lines in a row do not have an "@" or a person'

Re: Extract lines from file, add to new files

2024-01-12 Thread Left Right via Python-list
aren't context managers, it wouldn't have worked (or maybe not even parsed as "as" wouldn't be allowed inside tuple definition since there's no "universal as-expression" in Python it's hard to tell what the rules are). But, it turns out there's

Re: Extract lines from file, add to new files

2024-01-12 Thread Greg Ewing via Python-list
last): File "", line 1, in NameError: name 'i' is not defined There's no destructuring going on here, just assignment to a sequence item. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-12 Thread Left Right via Python-list
the term "destructuring" in the same way Hyperspec uses it. It's not a Python term. I don't know what you call the same thing in Python. I'm not sure what you understand from it. On Sat, Jan 13, 2024 at 12:37 AM Greg Ewing via Python-list wrote: > > On 13/01/24 12:11 a

Re: Extract lines from file, add to new files

2024-01-12 Thread Left Right via Python-list
is of > no consequence. > > > There's no destructuring going on here > > I use the term "destructuring" in the same way Hyperspec uses it. > It's not a Python term. I don't know what you call the same thing in > Python. I'm not sure what you

Re: Extract lines from file, add to new files

2024-01-12 Thread Chris Angelico via Python-list
On Sat, 13 Jan 2024 at 13:11, Left Right via Python-list wrote: > > Very few > languages allow arbitrary complex expressions in the same place they > allow variable introduction. What do you mean by this? Most languages I've worked with allow variables to be initializ

Re: Extract lines from file, add to new files

2024-01-12 Thread Dan Sommers via Python-list
On 2024-01-13 at 02:02:39 +0100, Left Right via Python-list wrote: > Actually, after some Web search. I think, based on this: > https://docs.python.org/3/reference/simple_stmts.html#grammar-token-python-grammar-augtarget > that in Python you call this "augmented assignment tar

Re: Extract lines from file, add to new files

2024-01-13 Thread Dan Sommers via Python-list
anything, it's just the way Python assignment works, all the way back to its earliest stages.¹ ⁰ https://docs.python.org/3/reference/simple_stmts.html#assignment-statements, ¹ https://docs.python.org/release/1.4/ref/ref6.html#HDR2 -- https://mail.python.org/mailman/listinfo/python-list

best tool to extract domain hierarchy from a dimension in an OLAP dataset (csv)

2024-01-13 Thread marc nicole via Python-list
Hi all, I have a csv OLAP dataset that I want to extract the domain hierarchies from each of its dimensions. Anybody could recommend a Python tool that could manage this properly? Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-13 Thread Greg Ewing via Python-list
signment. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-13 Thread Greg Ewing via Python-list
On 13/01/24 3:14 pm, Chris Angelico wrote: On Sat, 13 Jan 2024 at 13:11, Left Right via Python-list wrote: Very few languages allow arbitrary complex expressions in the same place they allow variable introduction. What do you mean by this? Most languages I've worked with allow vari

Re: mypy question

2024-01-13 Thread Karsten Hilbert via Python-list
Am Fri, Jan 12, 2024 at 02:23:43PM +0100 schrieb Antoon Pardon via Python-list: > > queries:list[dict[str, str | list | dict[str, Any]]]=None, > > > >into > > > > "List[Dict[str, Union[str, List[Any], Dict[str, Any" > > > >seems

Re: mypy question

2024-01-13 Thread Karsten Hilbert via Python-list
Am Sat, Jan 13, 2024 at 09:20:00PM +0100 schrieb Karsten Hilbert via Python-list: > > I was wondering if > > your type hint for queries shouldn't be the following. > > > > queries:list[dict[str,str]|dict[str,list]|dict[str,dict[str, dict[str, > > Ant]]] Wait,

Re: Extract lines from file, add to new files

2024-01-13 Thread Chris Angelico via Python-list
On Sun, 14 Jan 2024 at 14:43, dn via Python-list wrote: > Similarly, whilst we could write: > > a, b, c = 1, 2, 3 > I would only do this when it aligns particularly well with the algorithm being implemented. For example, you could start a Fibonacci evaluator with "a, b =

Re: Extract lines from file, add to new files

2024-01-14 Thread Chris Angelico via Python-list
times? > For example, you may say "functions in Python are > objects", but you cannot put a function definition in the head of the > for loop clause. What do you mean? for x in lambda: ...: ... Perfectly grammatical. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

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

2024-01-14 Thread Sibylle Koczian via Python-list
Am 09.01.2024 um 12:36 schrieb Barry Scott via Python-list: On 7 Jan 2024, at 15:09, Sibylle Koczian via Python-list wrote: Oh, and the two Windows and Python versions are on two different computers. Will remove the "/env" from my shebang lines, even if I don't un

Re: Extract lines from file, add to new files

2024-01-14 Thread Chris Angelico via Python-list
ell me that a def statement should be a valid assignment target, I don't know what you're smoking, but I want you to keep it a long way away from me. Can you name ANY language in which that would make the slightest bit of sense? ChrisA -- https://mail.python.org/mailman/listinfo/python-list

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

2024-01-14 Thread Thomas Passin via Python-list
On 1/14/2024 7:48 AM, Sibylle Koczian via Python-list wrote: Am 09.01.2024 um 12:36 schrieb Barry Scott via Python-list: On 7 Jan 2024, at 15:09, Sibylle Koczian via Python-list wrote: Oh, and the two Windows and Python versions are on two different computers. Will remove the "

RE: Extract lines from file, add to new files

2024-01-14 Thread AVI GROSS via Python-list
t be a bit different and perhaps someone would simply make a tiny function that when called, invoked the method. So, we have a hybrid of sorts and have to live with it, warts and all, and some of the warts may be seen by some as beauty marks. -Original Message----- From: Python-list On Behal

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

2024-01-14 Thread Thomas Passin via Python-list
On 1/14/2024 8:54 AM, Thomas Passin via Python-list wrote: On 1/14/2024 7:48 AM, Sibylle Koczian via Python-list wrote: Am 09.01.2024 um 12:36 schrieb Barry Scott via Python-list: On 7 Jan 2024, at 15:09, Sibylle Koczian via Python-list wrote: Oh, and the two Windows and Python versions

RE: Extract lines from file, add to new files

2024-01-14 Thread AVI GROSS via Python-list
the one where a method is finally called using some diamond algorithm. It is both extremely powerful but also silly to overuse such features. Avi -Original Message- From: Python-list On Behalf Of Chris Angelico via Python-list Sent: Sunday, January 14, 2024 8:34 AM To: python-list

Re: Extract lines from file, add to new files

2024-01-14 Thread Chris Angelico via Python-list
; in Python? Please elaborate. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-14 Thread Left Right via Python-list
be where the right-hand side is drawn from). 2. You used what Python calls "lambdadef" in place of what Python calls "function_def". I.e. lambda definition and function definition are two different things, at least as far as grammar is considered. So, you solved a different pr

Re: Extract lines from file, add to new files

2024-01-14 Thread Left Right via Python-list
". Python is furthermore unique in how the workaround creates a lot of opportunities for abuse. > The Python term, at least colloquially, is "tuple unpacking." Well, why use colloquialism if there's a language specification? Also, there weren't any tuples used in my example, at least not explicitly (i could've been a tuple, but that wasn't specified). -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-14 Thread Left Right via Python-list
ject, or how you decide to answer any of those questions: what value does such a claim possibly have? Especially, given the context... Furthermore, I'm absolutely convinced that what governs the restrictions on the left-hand side isn't not whether it's understood to be an object, but the grammar rules, that are unaware of the concept of objects. For example, you may say "functions in Python are objects", but you cannot put a function definition in the head of the for loop clause. -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-14 Thread Left Right via Python-list
o break this consistency: it saves some keystrokes for the programmers. I.e. allows for shorter programs, while doesn't add any new abilities to the language. -- https://mail.python.org/mailman/listinfo/python-list

RE: Extract lines from file, add to new files

2024-01-14 Thread AVI GROSS via Python-list
defending it. I am wondering if what is being discussed is in any way a serious issue. The original question in this thread really was a minor one and how it became whatever this is, well, I give up! LOL! -Original Message- From: Left Right Sent: Sunday, January 14, 2024 4:15 PM To:

Re: Extract lines from file, add to new files

2024-01-14 Thread Chris Angelico via Python-list
On Mon, 15 Jan 2024 at 09:40, dn via Python-list wrote: > The basic challenge came from my earlier (and blasé) repetition of the > Python refrain "everything in Python is an object". Which led to: > > <<< > For example, you may say "functions in Pyth

RE: Extract lines from file, add to new files

2024-01-14 Thread AVI GROSS via Python-list
computer language as being 100% right for every purpose. Python has some reasonable tradeoffs and is highly popular and there are other languages with other tradeoffs you can use instead. At this point, making changes without disrupting things gets ever harder. -Original Message----- From: Pytho

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

2024-01-14 Thread Mike Dewhirst via Python-list
scripts intended for execution in both Linux and Windows. They are ignored unless you use py.exe.My advice is to give up py.exe unless your use case mandates shebang lines in Windows.M--(Unsigned mail from my phone) Original message From: Sibylle Koczian via Python-list Date: 14/1/2

Re: Extract lines from file, add to new files

2024-01-14 Thread Chris Angelico via Python-list
On Mon, 15 Jan 2024 at 12:12, dn via Python-list wrote: > Here's another witticism I'll often toss at trainees (in many languages, > and especially in UX): just because we can do it, doesn't make it a good > idea! > Programming. We were so busy with whether we COULD t

Re: Extract lines from file, add to new files

2024-01-14 Thread Chris Angelico via Python-list
On Mon, 15 Jan 2024 at 12:42, dn via Python-list wrote: > > On 15/01/24 14:33, Chris Angelico via Python-list wrote: > > On Mon, 15 Jan 2024 at 12:12, dn via Python-list > > wrote: > >> Here's another witticism I'll often toss at trainees (in many langua

Re: Extract lines from file, add to new files

2024-01-14 Thread Greg Ewing via Python-list
;t require variables to be declared separately from their use. But this is a very common feature of dynamic languages generally. As language oddities go, it hardly rates a mention. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-14 Thread Greg Ewing via Python-list
't ignored, it appears in the grammar by means of INDENT and DEDENT lexical tokens. It's true that the meaning of these tokens is described informally elsewhere, but that's true of all the lexical features. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-15 Thread Chris Angelico via Python-list
On Mon, 15 Jan 2024 at 18:56, Greg Ewing via Python-list wrote: > > On 15/01/24 1:28 am, Left Right wrote: > > Python isn't a context-free language, so the grammar that is used to > > describe it doesn't actually describe the language > > Very few languages

Re: Extract lines from file, add to new files

2024-01-15 Thread Greg Ewing via Python-list
cal, Turbo Pascal, Delphi, etc. enjoyed a lot of popularity. A variant of UCSD was the main language for Macintosh application development for a number of years. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-15 Thread Greg Ewing via Python-list
using regular expressions. Although some might consider that this doesn't contradict your statement about readability. :-) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Extract lines from file, add to new files

2024-01-15 Thread Chris Angelico via Python-list
On Mon, 15 Jan 2024 at 19:26, Greg Ewing via Python-list wrote: > > On 15/01/24 9:07 pm, Chris Angelico wrote: > > The grammar *can't* specify everything. If it did, it would have to > > have rules for combining individual letters into a NAME and individual > > cha

Re: Extract lines from file, add to new files

2024-01-15 Thread Antoon Pardon via Python-list
Op 14/01/2024 om 13:28 schreef Left Right via Python-list: Python isn't a context-free language, so the grammar that is used to describe it doesn't actually describe the language... so, it's a "pretend grammar" that ignores indentation. No it doesn't. Here is

Question about garbage collection

2024-01-15 Thread Frank Millman via Python-list
uded, parent and child can be gc'd # for ch in p1.children: # ch.parent = None # if next line is included, child can be gc'd, but not parent # p1.children = None del c1_1 del p1 gc.collect() input('wait some more ...') -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about garbage collection

2024-01-15 Thread Skip Montanaro via Python-list
thon has normal reference counting, but also has a cyclic garbage collector. Here's plenty of detail about how it works: https://devguide.python.org/internals/garbage-collector/index.html Skip -- https://mail.python.org/mailman/listinfo/python-list

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

2024-01-15 Thread Sibylle Koczian via Python-list
Am 15.01.2024 um 00:46 schrieb Mike Dewhirst via Python-list: In Windows the provided methods for running complex command lines are either a batch file or a shortcut.Someone very kindly pointed out to me in this thread that there is a PEP for py.exe. I don't use py.exe originally beca

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

2024-01-15 Thread Mats Wichmann via Python-list
On 1/15/24 09:44, Sibylle Koczian via Python-list wrote: First and foremost I want to understand why I'm seeing this: - Python scripts with "/usr/bin/env python3" as shebang line work as expected on a computer with Windows 10 and Python 3.11.5. They have worked for years

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

2024-01-15 Thread Mats Wichmann via Python-list
On 1/15/24 09:44, Sibylle Koczian via Python-list wrote: In the Python documentation for versions 3.11 and 3.12 I found no differences regarding py.exe and shebang lines. Then I removed the "/env" from the shebang lines and could start the scripts from the second computer. That ce

Re: Question about garbage collection

2024-01-15 Thread Dieter Maurer via Python-list
h "legacy finalizer"s), garbage collection should not make problems. On the other hand, your application, too, must avoid memory leaks. Caches of various forms (with data for several sessions) might introduce them. -- https://mail.python.org/mailman/listinfo/python-list

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

2024-01-15 Thread Thomas Passin via Python-list
On 1/15/2024 1:26 PM, Mats Wichmann via Python-list wrote: On 1/15/24 09:44, Sibylle Koczian via Python-list wrote: First and foremost I want to understand why I'm seeing this: - Python scripts with "/usr/bin/env python3" as shebang line work as expected on a computer with

Re: Question about garbage collection

2024-01-15 Thread Akkana Peck via Python-list
> Frank Millman wrote at 2024-1-15 15:51 +0200: > >I have read that one should not have to worry about garbage collection > >in modern versions of Python - it 'just works'. Dieter Maurer via Python-list writes: > There are still some isolated cases when not all objec

Re: Question about garbage collection

2024-01-15 Thread Chris Angelico via Python-list
On Tue, 16 Jan 2024 at 06:32, Akkana Peck via Python-list wrote: > > > Frank Millman wrote at 2024-1-15 15:51 +0200: > > >I have read that one should not have to worry about garbage collection > > >in modern versions of Python - it 'just works'. > > Diet

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

2024-01-15 Thread Mats Wichmann via Python-list
On 1/15/24 12:01, Thomas Passin via Python-list wrote: On 1/15/2024 1:26 PM, Mats Wichmann via Python-list wrote: On 1/15/24 09:44, Sibylle Koczian via Python-list wrote: First and foremost I want to understand why I'm seeing this: - Python scripts with "/usr/bin/env python3"

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

2024-01-15 Thread Greg Ewing via Python-list
Greg -- https://mail.python.org/mailman/listinfo/python-list

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

2024-01-15 Thread Thomas Passin via Python-list
On 1/15/2024 6:27 PM, Greg Ewing via Python-list wrote: On 16/01/24 11:55 am, Mats Wichmann wrote: Windows natively has something called python.exe and python3.exe which is interfering here I'm wondering whether py.exe should be taught to recognise these stubs and ignore them. This s

Re: Question about garbage collection

2024-01-15 Thread Akkana Peck via Python-list
ication, so there are a lot of small pixbufs being repeatedly read and then deallocated. ...Akkana -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about garbage collection

2024-01-15 Thread Chris Angelico via Python-list
On Tue, 16 Jan 2024 at 13:49, Akkana Peck via Python-list wrote: > > I wrote: > > > Also be warned that some modules (particularly if they're based on > > > libraries not written in Python) might not garbage collect, so you may > > > need to use other meth

Re: Question about garbage collection

2024-01-15 Thread Thomas Passin via Python-list
On 1/15/2024 9:47 PM, Akkana Peck via Python-list wrote: I wrote: Also be warned that some modules (particularly if they're based on libraries not written in Python) might not garbage collect, so you may need to use other methods of cleaning up after those objects. Chris Angelico w

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

2024-01-15 Thread Thomas Passin via Python-list
On 1/15/2024 7:24 PM, Thomas Passin wrote: On 1/15/2024 6:27 PM, Greg Ewing via Python-list wrote: On 16/01/24 11:55 am, Mats Wichmann wrote: Windows natively has something called python.exe and python3.exe which is interfering here I'm wondering whether py.exe should be taught to reco

Re: Question about garbage collection

2024-01-16 Thread Frank Millman via Python-list
On 2024-01-15 3:51 PM, Frank Millman via Python-list wrote: Hi all I have read that one should not have to worry about garbage collection in modern versions of Python - it 'just works'. I don't want to rely on that. My app is a long-running server, with multiple clients lo

Re: Question about garbage collection

2024-01-16 Thread Chris Angelico via Python-list
On Tue, 16 Jan 2024 at 23:08, Frank Millman via Python-list wrote: > > On 2024-01-15 3:51 PM, Frank Millman via Python-list wrote: > > Hi all > > > > I have read that one should not have to worry about garbage collection > > in modern versions of Python - it 'j

Re: Question about garbage collection

2024-01-16 Thread Thomas Passin via Python-list
On 1/16/2024 4:17 AM, Barry wrote: On 16 Jan 2024, at 03:49, Thomas Passin via Python-list wrote: This kind of thing can happen with PyQt, also. There are ways to minimize it but I don't know if you can ever be sure all Qt C++ objects will get deleted. It depends on the type of o

Re: Question about garbage collection

2024-01-16 Thread Frank Millman via Python-list
On 2024-01-16 2:15 PM, Chris Angelico via Python-list wrote: Where do you tend to "leave a reference dangling somewhere"? How is this occurring? Is it a result of an incomplete transaction (like an HTTP request that never finishes), or a regular part of the operation of the server?

Re: Question about garbage collection

2024-01-16 Thread Chris Angelico via Python-list
On Wed, 17 Jan 2024 at 01:45, Frank Millman via Python-list wrote: > > On 2024-01-16 2:15 PM, Chris Angelico via Python-list wrote: > > > > Where do you tend to "leave a reference dangling somewhere"? How is > > this occurring? Is it a result of an incomplete tra

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

2024-01-16 Thread Sibylle Koczian via Python-list
Am 15.01.2024 um 23:55 schrieb Mats Wichmann via Python-list: On 1/15/24 12:01, Thomas Passin via Python-list wrote: On 1/15/2024 1:26 PM, Mats Wichmann via Python-list wrote: Python from the App Store is not the same as Python from python.org: yes. this question is about the python.org

Re: Question about garbage collection

2024-01-16 Thread Greg Ewing via Python-list
x27;t keep the Form alive after it's been closed. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about garbage collection

2024-01-16 Thread Greg Ewing via Python-list
n.org/mailman/listinfo/python-list

Re: Question about garbage collection

2024-01-16 Thread Frank Millman via Python-list
On 2024-01-17 3:01 AM, Greg Ewing via Python-list wrote: On 17/01/24 1:01 am, Frank Millman wrote: I sometimes need to keep a reference from a transient object to a more permanent structure in my app. To save myself the extra step of removing all these references when the transient object is

PyTorch

2024-01-17 Thread Alan Zaharia via Python-list
://mail.python.org/mailman/listinfo/python-list

Re: Question about garbage collection

2024-01-17 Thread Left Right via Python-list
error and work from there. Or, at least, have some monitoring data that suggests that your application memory use increases over time. Otherwise you could be spending a lot of time chasing problems you don't have. -- https://mail.python.org/mailman/listinfo/python-list

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

2024-01-17 Thread Mats Wichmann via Python-list
On 1/16/24 10:00, Sibylle Koczian via Python-list wrote: Am 15.01.2024 um 23:55 schrieb Mats Wichmann via Python-list: On 1/15/24 12:01, Thomas Passin via Python-list wrote: On 1/15/2024 1:26 PM, Mats Wichmann via Python-list wrote: Python from the App Store is not the same as Python from

Re: PyTorch

2024-01-17 Thread Mats Wichmann via Python-list
On 1/17/24 09:48, Alan Zaharia via Python-list wrote: Hello Python I Need help. it could not be found for PyTorch. It said in the Command Prompt ERROR: Could not find a version that satisfies the requirement torch (from versions: none) ERROR: No matching distribution found for torch, Can you

Python 3.13.0a3 is now available.

2024-01-17 Thread Thomas Wouters via Python-list
tributions to the Python Software Foundation. Regards from snowy Amsterdam, Your release team, Thomas Wouters Ned Deily Steve Dower Łukasz Langa -- Thomas Wouters -- https://mail.python.org/mailman/listinfo/python-list

RE: extend behaviour of assignment operator

2024-01-19 Thread AVI GROSS via Python-list
change the language so it pays attention to what it is giving a pointer too and then goes and tells ... -----Original Message- From: Python-list On Behalf Of Guenther Sohler via Python-list Sent: Tuesday, January 9, 2024 2:15 AM To: python-list@python.org Subject: extend behaviour of assign

How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread marc nicole via Python-list
) all_datasets_final.append(all_datasets)return all_datasets_final* If you have a better Pandas approach (unifying all these methods into one that make use of dataframe methods only) please let me know. thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
On 1/21/2024 7:37 AM, marc nicole via Python-list wrote: Hello, I have an initial dataframe with a random list of target cells (each cell being identified with a couple (x,y)). I want to yield four different dataframes each containing the value of one of the contour (surrounding) cells of each

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread marc nicole via Python-list
cells) target_cells_with_contour = apply_contours(target_cells, contour_cells) datasets = create_possible_datasets(zipf_dataset, target_cells_with_contour) print(datasets) main() Le dim. 21 janv. 2024 à 16:33, Thomas Passin via Python-list < python-list@python.org> a écrit : > On 1/2

Re: How to replace a cell value with each of its contour cells and yield the corresponding datasets seperately in a list according to a Pandas-way?

2024-01-21 Thread Thomas Passin via Python-list
r_cells = select_contours(target_cells)     print(contour_cells)     target_cells_with_contour = apply_contours(target_cells, contour_cells)     datasets = create_possible_datasets(zipf_dataset, target_cells_with_contour)     print(datasets) main() Le dim. 21 janv. 2024 à 16:33, Thomas Passin via P

<    37   38   39   40   41   42   43   44   45   46   >