ANN: Python Meeting Düsseldorf - 17.04.2024

2024-04-16 Thread eGenix Team via Python-list
/This announcement is in German since it targets a local user group//meeting in Düsseldorf, Germany/ Ankündigung Python Meeting Düsseldorf - April 2024 <https://www.egenix.com/company/news/Python-Meeting-Duesseldorf-2024-04-17> Ein Treffen von Python Enthusiast

Re: help: pandas and 2d table

2024-04-16 Thread jak via Python-list
ped to get the desired form as a list of pairs. And this is a technique very similar to reverse engineering. Thanks for the explanation and examples. All this is really clear and I was able to follow it easily because I have already written a version of this code in C without any kind of external library that uses the .CSV version of the table as data ( 234 code lines :^/ ). -- https://mail.python.org/mailman/listinfo/python-list

Re: help: pandas and 2d table

2024-04-16 Thread jak via Python-list
Stefan Ram ha scritto: df = df.where( df == 'zz' ).stack().reset_index() result ={ 'zz': list( zip( df.iloc[ :, 0 ], df.iloc[ :, 1 ]))} Since I don't know Pandas, I will need a month at least to understand these 2 lines of code. Thanks again. -- https://mail.python.org/mailman/listinfo/python

Custom importer and errors

2024-04-15 Thread Fabiano Sidler via Python-list
top import child1' the error changes to     ImportError: cannot import name 'child1' from 'top' (unknown location) How can I make this work? Best wishes, Fabiano -- https://mail.python.org/mailman/listinfo/python-list

Re: help: pandas and 2d table

2024-04-13 Thread Tim Williams via Python-list
On Sat, Apr 13, 2024 at 1:10 PM Mats Wichmann via Python-list < python-list@python.org> wrote: > On 4/13/24 07:00, jak via Python-list wrote: > > doesn't Pandas have a "where" method that can do this kind of thing? Or > doesn't it match what you are looking

Re: help: pandas and 2d table

2024-04-13 Thread Mats Wichmann via Python-list
On 4/13/24 07:00, jak via Python-list wrote: Stefan Ram ha scritto: jak wrote or quoted: Would you show me the path, please?    I was not able to read xls here, so I used csv instead; Warning:    the script will overwrite file "file_20240412201813_tmp_DML.csv"! import pa

Re: help: pandas and 2d table

2024-04-13 Thread jak via Python-list
thank you again for pointing me in the right direction. I had lost myself looking for a pandas method that would do this in a single shot or almost. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to Add ANSI Color to User Response

2024-04-13 Thread Pierre Fortin via Python-list
On Thu, 11 Apr 2024 05:00:32 +0200 Gisle Vanem via Python-list wrote: >Pierre Fortin wrote: > >> Over the years, I've tried different mechanisms for applying colors until >> I got my hands on f-stings; then I created a tiny module with all the >> colors (cR, cG, etc) wh

help: pandas and 2d table

2024-04-12 Thread jak via Python-list
t a result similar to this: { 'zz':[('foo1','foo3'), ('foo2','foo5'), ('foo3','foo2'), ('foo3','foo6'), ('foo5','foo4') ] } Would you show me the path, please? Thank you in advance. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to Add ANSI Color to User Response

2024-04-12 Thread Gisle Vanem via Python-list
to see this tiny module of yours. An URL or attach as inline text please. -- https://mail.python.org/mailman/listinfo/python-list

Re: First two bytes of 'stdout' are lost

2024-04-11 Thread Cameron Simpson via Python-list
tdout.read()) Well, it is not exactly like this, since this works properly Aye, I just tried that. All good. This code is actually run from C++ using the C Python API. This worked quite well, so the code was right at some point. But now, two things changed: - Now using python 3.11.7 instead of 3.7.12 -

Re: How to Add ANSI Color to User Response

2024-04-11 Thread Cameron Simpson via Python-list
meone else are probably `colourise` and `colourise_patterns`. Link: https://github.com/cameron-simpson/css/blob/26504f1df55e1bbdef00c3ff7f0cb00b2babdc01/lib/python/cs/ansi_colour.py#L96 I particularly use it to automatically colour log messages on a terminal, example code: https://github.com/camer

Re: First two bytes of 'stdout' are lost

2024-04-11 Thread Thomas Passin via Python-list
On 4/11/2024 8:42 AM, Olivier B. via Python-list wrote: I am trying to use StringIO to capture stdout, in code that looks like this: import sys from io import StringIO old_stdout = sys.stdout sys.stdout = mystdout = StringIO() print( "patate") mystdout.seek(0) sys.stdout = old_st

Re: First two bytes of 'stdout' are lost

2024-04-11 Thread Olivier B. via Python-list
rks properly > > This code is actually run from C++ using the C Python API. > This worked quite well, so the code was right at some point. But now, > two things changed: > - Now using python 3.11.7 instead of 3.7.12 > - Now using only the python limited C API > > And it

First two bytes of 'stdout' are lost

2024-04-11 Thread Olivier B. via Python-list
his, since this works properly This code is actually run from C++ using the C Python API. This worked quite well, so the code was right at some point. But now, two things changed: - Now using python 3.11.7 instead of 3.7.12 - Now using only the python limited C API And it seems that now, mys

Re: How to Add ANSI Color to User Response

2024-04-11 Thread Thomas Passin via Python-list
On 4/10/2024 6:41 PM, Alan Gauld via Python-list wrote: On 10/04/2024 19:50, WordWeaver Evangelist via Python-list wrote: I have a simple question. I use the following textPrompt in some of my Jython modules: '\nYour choice is? (A B C D E): ', maxChars=1, autoAccept=False

Data Ethics (Virtual) Meeting

2024-04-10 Thread dn via Python-list
://mail.python.org/mailman/listinfo/python-list

Re: How to Add ANSI Color to User Response

2024-04-10 Thread Grant Edwards via Python-list
On 2024-04-10, Alan Gauld via Python-list wrote: > On 10/04/2024 19:50, WordWeaver Evangelist via Python-list wrote: > >> I have a simple question. I use the following textPrompt in some of my >> Jython modules: >> '\nYour choice is? (A B C D E): ', maxC

Re: How to Add ANSI Color to User Response

2024-04-10 Thread David via Python-list
On Wed, 10 Apr 2024 at 18:51, WordWeaver Evangelist via Python-list wrote: > I have a simple question. I use the following textPrompt in some of my > Jython modules: > '\n [1;33mYour choice is? (A B C D E): ', maxChars=1, autoAccept=False, > forceUppercase=True) > Is the

Re: How to Add ANSI Color to User Response

2024-04-10 Thread Pierre Fortin via Python-list
On Thu, 11 Apr 2024 04:50:49 +1000 WordWeaver Evangelist via Python-list wrote: >Hello List, > >I have a simple question. I use the following textPrompt in some of my Jython >modules: > '\nYour choice is? (A B C D E): ', maxChars=1, autoAccept=False, > f

Re: How to Add ANSI Color to User Response

2024-04-10 Thread Alan Gauld via Python-list
On 10/04/2024 19:50, WordWeaver Evangelist via Python-list wrote: > I have a simple question. I use the following textPrompt in some of my Jython > modules: > '\nYour choice is? (A B C D E): ', maxChars=1, autoAccept=False, > forceUppercase=True) > Is there a way to ad

Re: How to Add ANSI Color to User Response

2024-04-10 Thread dn via Python-list
On 11/04/24 06:50, WordWeaver Evangelist via Python-list wrote: I have a simple question. I use the following textPrompt in some of my Jython modules: '\nYour choice is? (A B C D E): ', maxChars=1, autoAccept=False, forceUppercase=True) Is there a way to add an ANSI color code

Re: How to Add ANSI Color to User Response

2024-04-10 Thread Grant Edwards via Python-list
On 2024-04-10, WordWeaver Evangelist via Python-list wrote: > I have a simple question. I use the following textPrompt in some of my Jython > modules: > '\nYour choice is? (A B C D E): ', maxChars=1, autoAccept=False, > forceUppercase=True) > Is there a way to add an

How to Add ANSI Color to User Response

2024-04-10 Thread WordWeaver Evangelist via Python-list
of the user’s input is of a color of my choosing, instead of just white? Thank you very much in advance. Kind regards, Bill Kochman -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASE] Python 3.12.3 and 3.13.0a6 released

2024-04-10 Thread Abdur-Rahmaan Janhangeer via Python-list
> Mauritius On Tue, Apr 9, 2024 at 11:18 PM Thomas Wouters via Python-list < python-list@python.org> wrote: > *It’s time to eclipse the Python 3.11.9 release with two releases*, one of > which is the *very last alpha release of Python 3.13*: > < > https://discuss.pytho

Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-09 Thread Wenyong Wei via Python-list
hi Sravan, Thanks for your response, checked and found there is only one python in my PC. From: Sravan Kumar Chitikesi Sent: Tuesday, 9 April 2024 3:42 AM To: Wenyong Wei Cc: python-list@python.org Subject: Re: ModuleNotFoundError: No module named 'Paramiko

[RELEASE] Python 3.12.3 and 3.13.0a6 released

2024-04-09 Thread Thomas Wouters via Python-list
*It’s time to eclipse the Python 3.11.9 release with two releases*, one of which is the *very last alpha release of Python 3.13*: <https://discuss.python.org/t/python-3-12-3-and-3-13-0a6-released/50601#python-3123-1>Python 3.12.3 300+ of the finest commits went into this latest maint

Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-09 Thread Mats Wichmann via Python-list
On 4/7/24 19:31, Wenyong Wei via Python-list wrote: Dear Sir/Madam, Recently I encounter a problem that I can't import paramiko in my computer. My PC running on window 10 64 bits. I have investigate this issue via internet, there are a lot of solutions for this issue, after trying most

Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Thomas Passin via Python-list
On 4/8/2024 3:35 PM, Keith Thompson via Python-list wrote: Thomas Passin writes: On 4/8/2024 2:01 PM, Dietmar Schwertberger via Python-list wrote: To be sure, you can always go the the directory of the Python interpreter and open a cmd window there. (By entering 'cmd' into the explorer

Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Keith Thompson via Python-list
Thomas Passin writes: > On 4/8/2024 2:01 PM, Dietmar Schwertberger via Python-list wrote: >> To be sure, you can always go the the directory of the Python >> interpreter and open a cmd window there. >> (By entering 'cmd' into the explorer address bar.) >> Then ente

Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Thomas Passin via Python-list
On 4/8/2024 2:01 PM, Dietmar Schwertberger via Python-list wrote: To be sure, you can always go the the directory of the Python interpreter and open a cmd window there. (By entering 'cmd' into the explorer address bar.) Then enter 'python.exe -mpip install paramiko'. This way you can be sure

Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Dietmar Schwertberger via Python-list
To be sure, you can always go the the directory of the Python interpreter and open a cmd window there. (By entering 'cmd' into the explorer address bar.) Then enter 'python.exe -mpip install paramiko'. This way you can be sure that you're not running a pip.exe that belongs to another Python

Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Sravan Kumar Chitikesi via Python-list
pip may be pointed to another python version. try to remove other python versions and re install pip Regards, *Sravan Chitikesi* AWS Solutions Architect - Associate On Mon, Apr 8, 2024 at 10:58 PM Wenyong Wei via Python-list < python-list@python.org> wrote: > > Dear Sir/Madam, &g

ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Wenyong Wei via Python-list
steps I have try are: 1. Install python ver 3.7.1 or 3.11.8 by itself or customer installation (changing the installation folder) and check add python to the path. 2. pip install paramiko, if ver 3.7.1 installed, need to upgrade the pip version. 3. Checking the environment path, there are two

Re: Running issues

2024-04-06 Thread Mats Wichmann via Python-list
On 4/5/24 15:32, shannon makasale via Python-list wrote: Hi there, My name is Shannon. I installed Python 3.12 on my laptop a couple months ago, but realised my school requires me to use 3.11.1. they can suggest 3.11 and there might be a good reason for that, but you should not worry about

Re: Running issues

2024-04-05 Thread MRAB via Python-list
On 2024-04-05 22:32, shannon makasale via Python-list wrote: Hi there, My name is Shannon. I installed Python 3.12 on my laptop a couple months ago, but realised my school requires me to use 3.11.1. I uninstalled 3.12 and installed 3.11.1. Unfortunately, I am unable to run python now

Re: Running issues

2024-04-05 Thread o1bigtenor via Python-list
On Fri, Apr 5, 2024 at 4:40 PM shannon makasale via Python-list < python-list@python.org> wrote: > Hi there, > My name is Shannon. I installed Python 3.12 on my laptop a couple months > ago, but realised my school requires me to use 3.11.1. > > I uninstalled 3.12

Re: Running issues

2024-04-05 Thread Thomas Passin via Python-list
On 4/5/2024 5:32 PM, shannon makasale via Python-list wrote: Hi there, My name is Shannon. I installed Python 3.12 on my laptop a couple months ago, but realised my school requires me to use 3.11.1. I uninstalled 3.12 and installed 3.11.1. Unfortunately, I am unable to run python now

Running issues

2024-04-05 Thread shannon makasale via Python-list
Hi there, My name is Shannon. I installed Python 3.12 on my laptop a couple months ago, but realised my school requires me to use 3.11.1. I uninstalled 3.12 and installed 3.11.1. Unfortunately, I am unable to run python now. It keeps asking to be modified, repaired or uninstalled. Do you have

Re: A technique from a chatbot

2024-04-05 Thread Mark Bourne via Python-list
ementation and version of the Python implementation being used for the benchmark and also of the details of how exactly the benchmark is written. import random import string import timeit print( 'The following loop may need a few seconds or minutes, ' 'so please bear with me.' ) time_using

Re: A technique from a chatbot

2024-04-05 Thread Mark Bourne via Python-list
royed once that call is done. If you assigned it to a function-local variable, it would exist until the end of that function. What confuses the issue, for me, is that you can make fairly complex calculations in python using various forms of generators that implement a sort of just-in-tim

Re: A technique from a chatbot

2024-04-04 Thread Thomas Passin via Python-list
On 4/4/2024 3:03 PM, Mark Bourne via Python-list wrote: Thomas Passin wrote: On 4/2/2024 1:47 PM, Piergiorgio Sartor via Python-list wrote: On 02/04/2024 19.18, Stefan Ram wrote:    Some people can't believe it when I say that chatbots improve    my programming productivity. So, here's

RE: A technique from a chatbot

2024-04-04 Thread AVI GROSS via Python-list
such as by asking it to populate a list. In such a case, you may not necessarily want or need to use a generator expression and can use something straightforward and possible cheaper. What confuses the issue, for me, is that you can make fairly complex calculations in python using various

Re: A technique from a chatbot

2024-04-04 Thread Mark Bourne via Python-list
Thomas Passin wrote: On 4/2/2024 1:47 PM, Piergiorgio Sartor via Python-list wrote: On 02/04/2024 19.18, Stefan Ram wrote:    Some people can't believe it when I say that chatbots improve    my programming productivity. So, here's a technique I learned    from a chatbot!    It is a structured

How to get insight in the relations between tracebacks of exceptions in an exception-chain

2024-04-04 Thread Klaas van Schelven via Python-list
o _t1_ is of course the same as the path leading up to _t2_, and the creators of Python have chosen to present it only once, in the latter case, presumably because that Exception is usually the most interesting one, and because it allows one to read the bottom exception bottom-up without loss of in

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-04-04 Thread Jacob Kruger via Python-list
, the folder/directory where all my python source code is stored is set to be case-sensitive - there are a couple of ways to implement this under windows 10 and windows 11, via some external utilities, or by running the following command from a terminal/power-shell window, running

Re: xkcd.com/353 ( Flying with Python )

2024-04-03 Thread HenHanna via Python-list
in the old days), there was a convention of using var-name like *foo* to indicate it's a dynamic variable. and sometimes **foo** for and %foo% or %%foo%% was used for ... -- https://mail.python.org/mailman/listinfo/python-list

Re: xkcd.com/353 ( Flying with Python )

2024-04-03 Thread HenHanna via Python-list
On 3/29/2024 11:21 PM, HenHanna wrote: https://xkcd.com/353/  ( Flying with  Python ) https://xkcd.com/1306/   what does  SIGIL   mean? -- (i got it...Thanks!) Other  xkcd   that you like? my fav. one may be the one about [Bad-ass Hacker] [Nice-ass car

Re: A technique from a chatbot

2024-04-03 Thread Michael F. Stemper via Python-list
'airline'] >>> find_e(l) Traceback (most recent call last): File "", line 1, in File "", line 2, in find_e IndexError: list index out of range >>> -- Michael F. Stemper If it isn't running programs and it isn't fusing atoms, it's just bending space. -- https://mail.python.org/mailman/listinfo/python-list

Re: A technique from a chatbot

2024-04-03 Thread Pieter van Oostrum via Python-list
uot;something_to_be_done_at_the_end_of_this_function()") -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list

Re: Help Needed With a Python Gaming Module

2024-04-03 Thread Thomas Passin via Python-list
On 4/3/2024 3:06 PM, WordWeaver Evangelist via Python-list wrote: Hello everyone! It has been a l-o-n-g time -- nine years in fact --since I last participated on this mailing list. [snip] 3. You are very familiar with the Jython 2 environment, which I am told is based on Python 2

Help Needed With a Python Gaming Module

2024-04-03 Thread WordWeaver Evangelist via Python-list
a number of years later when I left BBSing behind, because I assumed it to be dead. Anyway, just recently I put my BBS back online again for the fourth time since 1993, and I am again endeavoring to write a new python-based external -- a game -- for my BBS. Before I continue, let me inform you

Re: Already Subscribed and Confirmed, But ....

2024-04-03 Thread Ethan Furman via Python-list
On 4/3/24 07:15, WordWeaver Evangelist via Python-list wrote: > Hello. I already subscribed to this list several days ago. In fact, I did it two times, and > I received the email with the confirmation link in it, which I clicked on and was confirmed. > > Despite this fact, each tim

Already Subscribed and Confirmed, But ....

2024-04-03 Thread WordWeaver Evangelist via Python-list
Hello. I already subscribed to this list several days ago. In fact, I did it two times, and I received the email with the confirmation link in it, which I clicked on and was confirmed. Despite this fact, each time that I try to post a message to the list. I get a response from the python bot

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-04-03 Thread Jacob Kruger via Python-list
2024/04/02 17:11, Barry wrote: On 1 Apr 2024, at 15:52, Jacob Kruger via Python-list wrote: Found many, many mentions of errors, with some of the same keywords, but, no resolutions that match my exact issue at all. Try asking the pyinstaller developers. I think there is a mailing li

RE: A technique from a chatbot

2024-04-03 Thread AVI GROSS via Python-list
instead of one at a time and so on. How many people ask how to TEST the code they get, especially from an AI-like ...? -Original Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Wednesday, April 3, 2024 7:51 AM To: python-list@python.org Subject: Re

Re: A technique from a chatbot

2024-04-03 Thread Thomas Passin via Python-list
On 4/3/2024 1:27 AM, AVI GROSS via Python-list wrote: I am a tad confused by a suggestion that any kind of GOTO variant is bad. The suggestion runs counter to the reality that underneath it all, compiled programs are chock full of GOTO variants even for simple things like IF-ELSE. Consider

RE: A missing iterator on itertools module?

2024-04-03 Thread AVI GROSS via Python-list
----- From: Python-list On Behalf Of Antoon Pardon via Python-list Sent: Wednesday, April 3, 2024 5:11 AM To: python-list@python.org Subject: Re: A missing iterator on itertools module? Op 28/03/2024 om 17:45 schreef ast via Python-list: > Hello > > Suppose I have these 3 strings: >

Re: A missing iterator on itertools module?

2024-04-03 Thread Antoon Pardon via Python-list
Op 28/03/2024 om 17:45 schreef ast via Python-list: Hello Suppose I have these 3 strings: s1 = "AZERTY" s2 = "QSDFGH" s3 = "WXCVBN" and I need an itertor who delivers A Q W Z S C E D C ... I didn't found anything in itertools to do the job. The docum

RE: A technique from a chatbot

2024-04-02 Thread AVI GROSS via Python-list
nt(first_word_beginning_with_e( text )) print(first_word_beginning_with_e( NorEaster )) Result of running it on a version of python ay least 3.8 so it supports the walrus operator: eastern None -Original Message- From: Python-list On Behalf Of Thomas Passin via Python-list Sent: Tue

Re: A technique from a chatbot

2024-04-02 Thread Thomas Passin via Python-list
On 4/2/2024 1:47 PM, Piergiorgio Sartor via Python-list wrote: On 02/04/2024 19.18, Stefan Ram wrote:    Some people can't believe it when I say that chatbots improve    my programming productivity. So, here's a technique I learned    from a chatbot!    It is a structured "break". &qu

Re: A technique from a chatbot

2024-04-02 Thread Piergiorgio Sartor via Python-list
metimes will not be executed here! So, "return" is similar to "break" in that regard. But in Python we can write: def first_word_beginning_with_e( list_ ): return next( ( word for word in list_ if word[ 0 ]== 'e' ), None ) Doesn't look a smart advice. . No

Re: Making 'compiled' modules work with multiple python versions on Linux

2024-04-02 Thread Barry via Python-list
> On 1 Apr 2024, at 18:14, Left Right via Python-list > wrote: > > It sounds weird that symbols from Limited API are _missing_ (I'd > expect them to be there no matter what library version you link with). You have to specify the version of the limited API that you want to us

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-04-02 Thread Barry via Python-list
> On 1 Apr 2024, at 15:52, Jacob Kruger via Python-list > wrote: > > Found many, many mentions of errors, with some of the same keywords, but, no > resolutions that match my exact issue at all. Try asking the pyinstaller developers. I think there is a maili

magic-wormhole 0.14.0

2024-04-01 Thread meejah via Python-list
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Greetings, I'm pleased to announce that magic-wormhole 0.14.0 is released. Magic Wormhole is a Python library and CLI tool to securely get arbitrary data from one computer to another using short, one-time, human- pronouncable codes and end-to-end

Re: Multiplication

2024-04-01 Thread dn via Python-list
The April Fools joke was on those of us who never received/have yet to receive @Stefan's OP. On 2/04/24 08:02, Avi Gross via Python-list wrote: Is this a April 1 post for fools. Multiplication with an asterisk symbol is built into python. The same symbol used in other contexts has other

Re: Multiplication

2024-04-01 Thread Avi Gross via Python-list
Is this a April 1 post for fools. Multiplication with an asterisk symbol is built into python. The same symbol used in other contexts has other contexts has an assortment of largely unrelated meanings such as meaning everything when used to import. On Mon, Apr 1, 2024, 1:27 PM Piergiorgio

Re: Multiplication

2024-04-01 Thread D'Arcy Cain via Python-list
On 2024-04-01 12:35, Joel Goldstick via Python-list wrote: On Mon, Apr 1, 2024 at 1:26 PM Piergiorgio Sartor via Python-list ^^^ from math import * a = 2 b = 3 print( a * b ) I guess the operator "*" can be imported from any module... :-) No import is

Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread PA via Python-list
> On Mar 30, 2024, at 22:09, Johanne Fairchild via Python-list > wrote: > > Sigil is noun. Definitions: > > A seal; a signet. > A sign or an image considered magical. > A seal; a signature. Creating Sigils The origin and design process informing Urbit's gener

Re: Multiplication

2024-04-01 Thread Joel Goldstick via Python-list
On Mon, Apr 1, 2024 at 1:26 PM Piergiorgio Sartor via Python-list wrote: > > On 01/04/2024 10.40, Stefan Ram wrote: > > Q: How can I multiply two variables in Python? I tried: > > > > a = 2 > > b = 3 > > print( ab ) > > > > but it di

Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread inhahe via Python-list
On Mon, Apr 1, 2024 at 1:26 PM HenHanna via Python-list < python-list@python.org> wrote: > Johanne Fairchild wrote: > > > HenHanna writes: > > >> https://xkcd.com/1306/ > >> what does SIGIL mean? > > > A glyph

Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread HenHanna via Python-list
Found in a real dictionary : Camel case , int,char, min, len, def, elseif cons, defun, cond, goto, -- https://mail.python.org/mailman/listinfo/python-list

Re: Multiplication

2024-04-01 Thread Piergiorgio Sartor via Python-list
On 01/04/2024 10.40, Stefan Ram wrote: Q: How can I multiply two variables in Python? I tried: a = 2 b = 3 print( ab ) but it did not work. A: No, this cannot work. To multiply, you need the multiplication operator. You can import the multiplication operator from

Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread Blue-Maned_Hawk via Python-list
u know what you are?” “Confused?” -- https://mail.python.org/mailman/listinfo/python-list

Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread Johanne Fairchild via Python-list
A seal; a signet. A sign or an image considered magical. A seal; a signature. Source: The American Heritage® Dictionary of the English Language, 5th Edition. -- https://mail.python.org/mailman/listinfo/python-list

Re: xkcd.com/353 ( Flying with Python )

2024-04-01 Thread HenHanna via Python-list
/1306:_Sigil_Cycle -- https://mail.python.org/mailman/listinfo/python-list

xkcd.com/353 ( Flying with Python )

2024-04-01 Thread HenHanna via Python-list
https://xkcd.com/353/ ( Flying with Python ) https://xkcd.com/1306/ what does SIGIL mean? Other xkcd that you like? -- https://mail.python.org/mailman/listinfo/python-list

Re: Making 'compiled' modules work with multiple python versions on Linux

2024-04-01 Thread Left Right via Python-list
ver looked at again. You, kind of, are already walking into the world of pain trying to make Python binary packages, and then you also want them to be cross-platform, and then you want them to be usable by different versions of Python... Unless it's for your own amusement, I'd just have a package p

Re: A missing iterator on itertools module?

2024-04-01 Thread Mark Bourne via Python-list
etermine a module's public API. In that case, setting `__all__ = ["f"]` in `A` should prevent it from offering `math` as a completion (nor any other name that's not in the `__all__` list). -- Mark. -- https://mail.python.org/mailman/listinfo/python-list

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-04-01 Thread Jacob Kruger via Python-list
Found many, many mentions of errors, with some of the same keywords, but, no resolutions that match my exact issue at all. As in, most of them are mentioning older versions of python, and, mainly different platforms - mac and linux, but, various google searches have not mentioned much

RE: Can you help me with this memoization simple example?

2024-03-31 Thread AVI GROSS via Python-list
I am not sure if it was made clear that there is a general rule in python for what is HASHABLE and lists are changeable while tuples are not so the latter can be hashed as a simple copy of a list, albeit the contents must also be immutable. The memorize function uses a dictionary to store

Re: Can you help me with this memoization simple example?

2024-03-31 Thread MRAB via Python-list
t in cache: cache[key] = f(args[0], args[1]) return cache[key] return g Anything else is good in my code ? Thanks Le dim. 31 mars 2024 à 01:44, MRAB via Python-list a écrit : On 2024-03-31 00:09, marc nicole via Python-list wrote: > I am creating a memoization example wi

Re: xkcd.com/353 ( Flying with Python )

2024-03-31 Thread Peter J. Holzer via Python-list
On 2024-03-31 12:27:34 -0600, Mats Wichmann via Python-list wrote: > On 3/30/24 10:31, MRAB via Python-list wrote: > > On 2024-03-30 11:25, Skip Montanaro via Python-list wrote: > > > > > https://xkcd.com/1306/ > > > > >   what does 

Re: xkcd.com/353 ( Flying with Python )

2024-03-31 Thread Peter J. Holzer via Python-list
On 2024-03-30 17:58:08 +, Alan Gauld via Python-list wrote: > On 30/03/2024 07:04, Greg Ewing via Python-list wrote: > > On 30/03/24 7:21 pm, HenHanna wrote: > >> https://xkcd.com/1306/ > >> what does  SIGIL   mean? > > > &

Re: xkcd.com/353 ( Flying with Python )

2024-03-31 Thread Mats Wichmann via Python-list
On 3/30/24 10:31, MRAB via Python-list wrote: On 2024-03-30 11:25, Skip Montanaro via Python-list wrote: > https://xkcd.com/1306/ >   what does  SIGIL   mean? I think its' a Perl term, referring to the $/@/# symbols in front of identifiers. I wouldn't co

Re: Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-03-31 Thread Barry via Python-list
> On 31 Mar 2024, at 13:24, Jacob Kruger via Python-list > wrote: > > pkg_resources.DistributionNotFound: The 'altgraph' distribution was not found > and is required by the application I think I have seen this error being discussed before… A web search for pyinstaller and t

Trying to use pyinstaller under python 3.11, and, recently started receiving error message about specific module/distribution

2024-03-31 Thread Jacob Kruger via Python-list
the application # ---end of output--- I have tried completely removing python's installation, and, reinstalling it, but, same issue more or less immediately. If I freeze pip's installed list within this specific virtual environment, it lists the following: altgraph==0.17.4 packaging==24.0

Re: Can you help me with this memoization simple example?

2024-03-31 Thread marc nicole via Python-list
ch tuple I should use to refer to the underlying list value as you suggest? Anything else is good in my code ? Thanks Le dim. 31 mars 2024 à 01:44, MRAB via Python-list a écrit : > On 2024-03-31 00:09, marc nicole via Python-list wrote: > > I am creating a memoization example with a fu

Re: Can you help me with this memoization simple example?

2024-03-30 Thread MRAB via Python-list
On 2024-03-31 00:09, marc nicole via Python-list wrote: I am creating a memoization example with a function that adds up / averages the elements of an array and compares it with the cached ones to retrieve them in case they are already stored. In addition, I want to store only if the result

Can you help me with this memoization simple example?

2024-03-30 Thread marc nicole via Python-list
vg") elapsed = time.time() - t print(res) print(elapsed) -- https://mail.python.org/mailman/listinfo/python-list

Re: xkcd.com/353 ( Flying with Python )

2024-03-30 Thread Alan Gauld via Python-list
On 30/03/2024 07:04, Greg Ewing via Python-list wrote: > On 30/03/24 7:21 pm, HenHanna wrote: >> https://xkcd.com/1306/ >> what does  SIGIL   mean? > > I think its' a Perl term, referring to the $/@/# symbols in front of > identifiers.

Re: xkcd.com/353 ( Flying with Python )

2024-03-30 Thread MRAB via Python-list
On 2024-03-30 11:25, Skip Montanaro via Python-list wrote: > https://xkcd.com/1306/ > what does SIGIL mean? I think its' a Perl term, referring to the $/@/# symbols in front of identifiers. I had a vague recollection of hearing it elsewhere (*Game of T

Re: xkcd.com/353 ( Flying with Python )

2024-03-30 Thread Skip Montanaro via Python-list
ags?), but didn't know what it meant. Google tells me: *an inscribed or painted symbol considered to have magical power.* So, they're more than just line noise. They confer power on their users... Perhaps '@' in the context of decorators is the most prominent example in Python, since decorat

Re: xkcd.com/353 ( Flying with Python )

2024-03-30 Thread Greg Ewing via Python-list
On 30/03/24 7:21 pm, HenHanna wrote: https://xkcd.com/1306/ what does  SIGIL   mean? I think its' a Perl term, referring to the $/@/# symbols in front of identifiers. -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Making 'compiled' modules work with multiple python versions on Linux

2024-03-29 Thread Barry Scott via Python-list
> On 29 Mar 2024, at 16:09, Olivier B. > wrote: > > It is not a symlink on my system, where i built python myself, but a > 15KB so file. But it seems to lack lots of python symbols. > > Maybe what i should do is actually make libpython.so a physical copy > of libpy

Re: Making 'compiled' modules work with multiple python versions on Linux

2024-03-29 Thread Olivier B. via Python-list
It is not a symlink on my system, where i built python myself, but a 15KB so file. But it seems to lack lots of python symbols. Maybe what i should do is actually make libpython.so a physical copy of libpyton311.so before linking to it, so now on any system the module would look to load

Re: Making 'compiled' modules work with multiple python versions on Linux

2024-03-29 Thread Barry via Python-list
> On 28 Mar 2024, at 16:13, Olivier B. via Python-list > wrote: > > But on Linux, it seems that linking to libpython3.so instead of > libpython3.11.so.1.0 does not have the same effect, and results in > many unresolved python symbols at link time > > Is this func

Re: A missing iterator on itertools module?

2024-03-28 Thread ast via Python-list
n iterable. You could also use "*" instead of "list" to print it. So, import itertools as _itertools s =[ "AZERTY", "QSDFGH", "WXCVBN" ] print( *_itertools.chain.from_iterable( zip( *s ))) . But these are only minor nitpicks; you have found a nice solution! Why did you renamed itertools as _itertools ? -- https://mail.python.org/mailman/listinfo/python-list

Re: A missing iterator on itertools module?

2024-03-28 Thread ast via Python-list
Le 28/03/2024 à 17:45, ast a écrit : A Q W Z S C E D C ... sorry A Q W Z S X E D C -- https://mail.python.org/mailman/listinfo/python-list

A missing iterator on itertools module?

2024-03-28 Thread ast via Python-list
ip("AZERTY", "QSDFGH", "WXCVBN"))) ['A', 'Q', 'W', 'Z', 'S', 'X', 'E', 'D', 'C', 'R', 'F', 'V', 'T', 'G', 'B', 'Y', 'H', 'N'] Do you havbe a neat solution ? -- https://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >