Changing path to python in pip.exe, ipython.exe, etc

2024-04-25 Thread Olivier B. via Python-list
I am building a python work environment where - i build python from sources - install pip with the wheel bundled with python - then install things with pip, like Jupyter That environment is then deployed on various machines, at various installation folders. One issue I encounter, is the path

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 Ein Treffen von Python Enthusiasten und

Re: help: pandas and 2d table

2024-04-16 Thread jak via Python-list
Stefan Ram ha scritto: jak wrote or quoted: 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.

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. --

Custom importer and errors

2024-04-15 Thread Fabiano Sidler via Python-list
Hi folks! I'd like to split my package tree into several IDE projects and build a custom importer to import     'top.child1.child2' from the directory     /top.child1.child2/__init__.py so basically replacing the dots with slashes and having the package content lying directly in the project

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 for? Pretty sure numpy does, but >

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 pandas as pd with

Re: help: pandas and 2d table

2024-04-13 Thread jak via Python-list
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 pandas as pd with open( 'file_20240412201813_tmp_DML.csv', 'w' )as

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) which made my life so much

help: pandas and 2d table

2024-04-12 Thread jak via Python-list
Hi everyone. I state that I don't know anything about 'pandas' but I intuited that it could do what I want. I get, through the "read_excel" method, a table similar to this: obj| foo1 foo2 foo3 foo4 foo5 foo6 --- foo1| aa ab zz ad ae af

Re: How to Add ANSI Color to User Response

2024-04-12 Thread Gisle Vanem via Python-list
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) which made my life so much simpler (attached). Attachments are stripped off in this list. It would be nice

Re: First two bytes of 'stdout' are lost

2024-04-11 Thread Cameron Simpson via Python-list
On 11Apr2024 14:42, Olivier B. 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_stdout print(mystdout.read())

Re: How to Add ANSI Color to User Response

2024-04-11 Thread Cameron Simpson via Python-list
On 10Apr2024 23:41, Alan Gauld wrote: Normally, for any kind of fancy terminal work, I'd say use curses. My problem with curses is that it takes over the whole terminal - you need to manage everything from that point on. Great if you want it (eg some full-terminal tool like `top`) but

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_stdout

Re: First two bytes of 'stdout' are lost

2024-04-11 Thread Olivier B. via Python-list
Partly answering myself: For some reason, right after mystdout has been created, i now have to do mystdout.seek(0) and this solves the issue. No idea why though.. Le jeu. 11 avr. 2024 à 14:42, Olivier B. a écrit : > > I am trying to use StringIO to capture stdout, in code that looks like this:

First two bytes of 'stdout' are lost

2024-04-11 Thread Olivier B. via Python-list
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_stdout print(mystdout.read()) Well, it is not exactly like this, since

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
Virtual meeting, Wed 17 April, 1800 for 1830 (NZST, ie 0630 UTC) Data Ethics Emma McDonald is the Director of the Interim Centre for Data Ethics and Innovation at Stats NZ (New Zealand Government Department of Statistics) Emma will talk about why Stats NZ is establishing a Centre for Data

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): ', maxChars=1, autoAccept=False, >>

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 there a way to add an

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, > forceUppercase=True) >Is there a

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 add an ANSI color

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 to the

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 ANSI color code

How to Add ANSI Color to User Response

2024-04-10 Thread WordWeaver Evangelist via Python-list
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, forceUppercase=True) Is there a way to add an ANSI color code to the end where the conditions are, so that the color of

Re: [RELEASE] Python 3.12.3 and 3.13.0a6 released

2024-04-10 Thread Abdur-Rahmaan Janhangeer via Python-list
I have to comment on this one: "Docstrings now have their leading indentation stripped" Incredibly useful! Kind Regards, Abdur-Rahmaan Janhangeer about | blog github Mauritius On Tue, Apr

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*: Python 3.12.3 300+ of the finest commits went into this latest maintenance

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 of

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 enter 'python.exe -mpip install

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, > > Recently I

ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Wenyong Wei via Python-list
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 of the steps, I still can't run this module, the major

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. It

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 and installed 3.11.1. > >

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. It

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
Stefan Ram wrote: Mark Bourne wrote or quoted: I don't think there's a tuple being created. If you mean: ( word for word in list_ if word[ 0 ]== 'e' ) ...that's not creating a tuple. It's a generator expression, which generates the next value each time it's called for. If you only ever

Re: A technique from a chatbot

2024-04-05 Thread Mark Bourne via Python-list
avi.e.gr...@gmail.com wrote: That is an excellent point, Mark. Some of the proposed variants to the requested problem, including mine, do indeed find all instances only to return the first. This can use additional time and space but when done, some of the overhead is also gone. What I mean is

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 a

RE: A technique from a chatbot

2024-04-04 Thread AVI GROSS via Python-list
That is an excellent point, Mark. Some of the proposed variants to the requested problem, including mine, do indeed find all instances only to return the first. This can use additional time and space but when done, some of the overhead is also gone. What I mean is that a generator you create

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
Hi, This question is best introduced example-first: Consider the following trivial program: ``` class OriginalException(Exception): pass class AnotherException(Exception): pass def raise_another_exception(): raise AnotherException() def show_something(): try: raise

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
Ok, had received response on pyinstaller mailing list, but, also just related to trying clean uninstall/reinstall of modules, but, while checking that out, something else occurred to me, and, it now operates as it should. Anyway, what seemed to be causing issue was actually that, since,

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

2024-04-03 Thread HenHanna via Python-list
Blue-Maned_Hawk wrote: HenHanna wrote: https://xkcd.com/1306/ what does SIGIL mean? I'd define a sigil as a mandatory symbol used to indicate the properties of a name. if i'm getting this right... Sigil is part of the language spec, whereas (in Lisp

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
On 03/04/2024 13.45, Gilmeh Serda wrote: On 2 Apr 2024 17:18:16 GMT, Stefan Ram wrote: first_word_beginning_with_e Here's another one: def ret_first_eword(): ... return [w for w in ['delta', 'epsilon', 'zeta', 'eta', 'theta'] if w.startswith('e')][0] ... ret_first_eword() 'epsilon'

Re: A technique from a chatbot

2024-04-03 Thread Pieter van Oostrum via Python-list
r...@zedat.fu-berlin.de (Stefan Ram) writes: > It can lead to errors: > > def first_word_beginning_with_e( list_ ): > for word in list_: > if word[ 0 ]== 'e': return word > something_to_be_done_at_the_end_of_this_function() > > The call sometimes will not be executed

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 and NOT

Help Needed With a Python Gaming Module

2024-04-03 Thread WordWeaver Evangelist via Python-list
Hello everyone! It has been a l-o-n-g time -- nine years in fact --since I last participated on this mailing list. At that time, I was trying to write a door/external for my PC-ANSI, Macintosh-based BBS. Thanks to some of the folks here, I got it done although I eventually lost the module

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 time that I try

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
Ok, last update for now - checked out the following page on pyinstaller.org, and, ended up posting to the mailing list, so, let's see: https://pyinstaller.org/en/latest/when-things-go-wrong.html Jacob Kruger +2782 413 4791 "Resistance is futile!...Acceptance is versatile..." On 2024/04/02

RE: A technique from a chatbot

2024-04-03 Thread AVI GROSS via Python-list
Sadly, Thomas, this is not even all that new. I have seen people do searches on the internet for how to do one thing at a time and then cobble together some code that does something but perhaps not quite what they intended. Some things are just inefficient such as reading data from a file, doing

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
Antoon, Even if the suggested solution offers a partial result, you would need specific requirements to determine what should be done if one or more of the parts being cycled is shorter than the others. Stopping at that point is one option. Another is to continue but only interleave ones still

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 documentation mentions a roundrobin

RE: A technique from a chatbot

2024-04-02 Thread AVI GROSS via Python-list
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 the code here: >> def first_word_beginning_with_e( list_

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". "Break" still

Re: A technique from a chatbot

2024-04-02 Thread Piergiorgio Sartor via Python-list
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". "Break" still is a kind of jump, you know? So, what's a

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 use. Each release

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 mailing list. Barry > > > As in,

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 necessary. Of

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 generative user avatar system,

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 did not work. > > > > A: No, this cannot work. To

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 used in magic. Or, for Perl, the symbol in front of a

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

2024-04-01 Thread HenHanna via Python-list
Johanne Fairchild wrote: HenHanna writes: https://xkcd.com/1306/ what does SIGIL mean? A glyph used in magic. Or, for Perl, the symbol in front of a variable name, such as $, @, and %. Source: https://perldoc.perl.org/perlglossary#sigil Sigil

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
HenHanna wrote: > https://xkcd.com/1306/ > what does SIGIL mean? I'd define a sigil as a mandatory symbol used to indicate the properties of a name. -- Blue-Maned_Hawk│shortens to Hawk│/blu.mɛin.dʰak/│he/him/his/himself/Mr. blue-maned_hawk.srht.site “Do you know

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

2024-04-01 Thread Johanne Fairchild via Python-list
HenHanna writes: > https://xkcd.com/1306/ > what does SIGIL mean? A glyph used in magic. Or, for Perl, the symbol in front of a variable name, such as $, @, and %. Source: https://perldoc.perl.org/perlglossary#sigil Sigil is noun. Definitions: A seal;

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

2024-04-01 Thread HenHanna via Python-list
Greg Ewing 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. thanks!

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
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). But, I haven't done this myself, so, what do I know? It would help though to see the actual error. That aside: why do you want to do this? One side effect of

Re: A missing iterator on itertools module?

2024-04-01 Thread Mark Bourne via Python-list
Stefan Ram wrote: ast wrote or quoted: Why did you renamed itertools as _itertools ? Assume I have a module A.py: import math def f(): pass . Assume I have an additional module B.py: import A . Now, when I'm editing "B.py" in IDLE and type "A.", IIRC IDLE will offer me two

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 of

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
On 2024-03-31 09:04, marc nicole wrote: Thanks for the first comment which I incorporated but when you say "You can't use a list as a key, but you can use a tuple as a key, provided that the elements of the tuple are also immutable." does it mean  the result of sum of the array is not

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  SIGIL   mean? > > > > > > > > I think

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? > > > > I think its' a Perl term, referring to the

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 consider '@' to

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 that error leads

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
This started happening this past week, and, while it's worked fine in the past, the moment I try to launch the pyinstaller process at all, to generate compiled output, or even if just launch it with no command line options, I receive the following error message:

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

2024-03-31 Thread marc nicole via Python-list
Thanks for the first comment which I incorporated but when you say "You can't use a list as a key, but you can use a tuple as a key, provided that the elements of the tuple are also immutable." does it mean the result of sum of the array is not convenient to use as key as I do? Which tuple I

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 of

Can you help me with this memoization simple example?

2024-03-30 Thread marc nicole via Python-list
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 of the function differs considerably (passes a threshold e.g.

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. There seem to be several

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 Thrones,*

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

2024-03-30 Thread Skip Montanaro via Python-list
> > > 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 Thrones,* on the armies' battle flags?), but didn't know what

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 libpyton311.so before linking to

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 functionality only available on

Re: A missing iterator on itertools module?

2024-03-28 Thread ast via Python-list
Le 28/03/2024 à 18:07, Stefan Ram a écrit : ast wrote or quoted: 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. So I came up with this solution: list(chain.from_iterable(zip("AZERTY",

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

  1   2   3   4   5   6   7   8   9   10   >