Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Grant Edwards via Python-list
On 2024-05-29, Chris Angelico via Python-list wrote: > print(f"if block {name[index]=} {index=}") Holy cow! How did I not know about the f-string {=} thing? -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Re: Formatted Output and Argument Parsing (was: Re: Flubbed it in the second interation through the string: range error... HOW?)

2024-05-29 Thread Chris Angelico via Python-list
On Wed, 29 May 2024 at 23:06, Dan Sommers via Python-list wrote: > (For the history-impaired, getopt existed long before Python and will > likely exist long after it, but getopt's "replacement" optparse lasted > only from 2003 until 2011.) Depends on your definition of "lasted". It's not getting

Formatted Output and Argument Parsing (was: Re: Flubbed it in the second interation through the string: range error... HOW?)

2024-05-29 Thread Dan Sommers via Python-list
On 2024-05-29 at 17:14:51 +1000, Chris Angelico via Python-list wrote: > I wouldn't replace str.format() everywhere, nor would I replace > percent encoding everywhere - but in this case, I think Thomas is > correct. Not because it's 2024 (f-strings were brought in back in > 2015, so they're

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Thomas Passin via Python-list
On 5/29/2024 3:14 AM, Chris Angelico via Python-list wrote: On Wed, 29 May 2024 at 16:03, Cameron Simpson via Python-list wrote: By which Thomas means stuff like this: print(f'if block {name[index]} and index {index}') Notice the leading "f'". Personally I wouldn't even go that far,

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread MRAB via Python-list
On 2024-05-29 05:33, Kevin M. Wilson via Python-list wrote: The following is my effort to understand how to process a string, letter, by letter: def myfunc(name):        index = 0    howmax = len(name)    # while (index <= howmax):    while (index < howmax):        if (index % 2 == 0):         

Re: SOLVED! Re: Weird Stuff (Markdown, syntax highlighting and Python)

2024-05-29 Thread o1bigtenor via Python-list
On Tue, May 28, 2024 at 9:48 PM Gilmeh Serda via Python-list < python-list@python.org> wrote: > > Solved by using a different method. > > - - - And that was how? TIA -- https://mail.python.org/mailman/listinfo/python-list

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Chris Angelico via Python-list
On Wed, 29 May 2024 at 16:03, Cameron Simpson via Python-list wrote: > By which Thomas means stuff like this: > > print(f'if block {name[index]} and index {index}') > > Notice the leading "f'". Personally I wouldn't even go that far, just: > > print('if block', name[index], 'and index',

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-29 Thread Cameron Simpson via Python-list
On 29May2024 01:14, Thomas Passin wrote: Also, it's 2024 ... time to start using f-strings (because they are more readable than str.format()) By which Thomas means stuff like this: print(f'if block {name[index]} and index {index}') Notice the leading "f'". Personally I wouldn't even go

Re: Flubbed it in the second interation through the string: range error... HOW?

2024-05-28 Thread Thomas Passin via Python-list
Your code is unreadable. The lines have all run together. And after that, kindly explain what you want your code sample to do. "Process" doesn't say much. From what I can make out about what you are trying to do, you would do better to index through your string with for i, chr in

Fw: Flubbed it in the second interation through the string: range error... HOW?

2024-05-28 Thread Kevin M. Wilson via Python-list
The format in this email is not of my making, should someone know, how to do this so that it's a readable script do tell! KMW *** "When you pass through the waters, I will be with you: and when you pass through the rivers, they will not sweep over 

Flubbed it in the second interation through the string: range error... HOW?

2024-05-28 Thread Kevin M. Wilson via Python-list
The following is my effort to understand how to process a string, letter, by letter: def myfunc(name):        index = 0    howmax = len(name)    # while (index <= howmax):    while (index < howmax):        if (index % 2 == 0):            print('letter to upper = {}, index

Re: Serializing pydantic enums

2024-05-28 Thread Left Right via Python-list
Most Python objects aren't serializable into JSON. Pydantic isn't special in this sense. What can you do about this? -- Well, if this is a one-of situation, then, maybe just do it by hand? If this is a recurring problem: json.dumps() takes a cls argument that will be used to do the

Serializing pydantic enums

2024-05-28 Thread Larry Martell via Python-list
Just getting started with pydantic. I have this example code: class FinishReason(Enum): stop = 'stop' class Choice(BaseModel): finish_reason: FinishReason = Field(...) But I cannot serialize this: json.dumps(Choice(finish_reason=FinishReason.stop).dict()) *** TypeError: Object of type

Re: Weird Stuff (Markdown, syntax highlighting and Python)

2024-05-27 Thread Thomas Passin via Python-list
On 5/26/2024 2:28 AM, Gilmeh Serda via Python-list wrote: The web claims (I think on all pages I've read about Markdown and Python) that this code should work, with some very minor variants on the topic: ```python import os with open(os.path.join('/home/user/apath', 'somefile')) as f:

Re: Any marginally usable programming language approaches an ill defined barely usable re-implementation of half of Common-Lisp

2024-05-27 Thread Dan Sommers via Python-list
On 2024-05-27 at 12:37:01 -0700, HenHanna via Python-list wrote: > > On 5/27/2024 7:18 AM, Cor wrote: > > Some entity, AKA "B. Pym" , > > wrote this mindboggling stuff: > > (selectively-snipped-or-not-p) > > > > > On 12/16/2023, c...@clsnet.nl wrote: > > > > > > > Any marginally usable

Re: Weird Stuff (Markdown, syntax highlighting and Python)

2024-05-27 Thread dn via Python-list
With reference to another reply here, the "Weird stuff" came from reading the question, finding it unclear, and only later realising that whereas most people write Markdown-formatted documents for later processing, or perhaps docstrings in Markdown-format for collection by documentation

Any marginally usable programming language approaches an ill defined barely usable re-implementation of half of Common-Lisp

2024-05-27 Thread HenHanna via Python-list
On 5/27/2024 7:18 AM, Cor wrote: Some entity, AKA "B. Pym" , wrote this mindboggling stuff: (selectively-snipped-or-not-p) On 12/16/2023, c...@clsnet.nl wrote: Any marginally usable programming language approaches an ill defined barely usable re-implementation of half of

Re: Weird Stuff (Markdown, syntax highlighting and Python)

2024-05-27 Thread Grant Edwards via Python-list
On 2024-05-26, Gilmeh Serda via Python-list wrote: > The web claims (I think on all pages I've read about Markdown and Python) > that this code should work, with some very minor variants on the topic: > > ```python > > import os > > with open(os.path.join('/home/user/apath', 'somefile')) as f: >

Can't trap paramiko runtime trace-back error

2024-05-22 Thread Vinode Singh Ujlain via Python-list
When running the code below , I get error as enumerated below. Why am I not able to trap this paramiko runtime traceback in try-except block ? Exception (client): Error reading SSH protocol banner Traceback (most recent call last):   File

Re: Cprod -- (writing this: itertools.product([0, 1], repeat=N )

2024-05-22 Thread HenHanna via Python-list
dn wrote: On 22/05/24 07:14, HenHanna via Python-list wrote: How can i write this function Cprod (Cartesian Product) simply?     (writing this out: itertools.product([0, 1], repeat=N ) The value can be a list or a Tuple.     cprod([0, 1], 1) => ((0) (1))

Re: Cprod -- (writing this: itertools.product([0, 1], repeat=N )

2024-05-21 Thread dn via Python-list
On 22/05/24 07:14, HenHanna via Python-list wrote: How can i write this function Cprod (Cartesian Product) simply?     (writing this out: itertools.product([0, 1], repeat=N ) The value can be a list or a Tuple.     cprod([0, 1], 1) => ((0) (1))    

Cprod -- (writing this: itertools.product([0, 1], repeat=N )

2024-05-21 Thread HenHanna via Python-list
How can i write this function Cprod (Cartesian Product) simply? (writing this out: itertools.product([0, 1], repeat=N ) The value can be a list or a Tuple. cprod([0, 1], 1) => ((0) (1)) cprod([0, 1], 2) => ((0,0) (0,1) (1,0) (1,1)) This

Re: pip and venvs on Debian

2024-05-21 Thread Roel Schroeven via Python-list
Op 20/05/2024 om 23:48 schreef Akkana Peck via Python-list: Every so often I need to regenerate it (like when Debian updates the system Python version) but that's easy to do: I don't try to duplicate what's installed there, I just delete the old venv, create a new one and then pip install

pip and venvs on Debian (was: Terminal Emulator)

2024-05-20 Thread Akkana Peck via Python-list
Alan Gauld via Python-list writes: > On 18/05/2024 19:12, Piergiorgio Sartor via Python-list wrote: > > >> So venvs make managing all that pretty convenient. Dunno why everybody's > >> so down on venvs... > > Not so much down on them, they are just one extra step that's > mostly not needed(in

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-20 Thread Gordinator via Python-list
On 20/05/2024 10:58, Peter J. Holzer wrote: On 2024-05-20 00:26:03 +0200, Roel Schroeven via Python-list wrote: Skip Montanaro via Python-list schreef op 20/05/2024 om 0:08: Modern debian (ubuntu) and fedora block users installing using pip. Even if you're telling it to install in ~/.local?

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-20 Thread Gordinator via Python-list
I'm on Manjaro Of course, I'm not here to tell you how to use your computer, and it's great that you're using Linux, but I'd suggest that you look into installing Arch Linux proper. Arch Linux isn't as difficult as people make it out to be (I'd argue that anyone who's had to deal with the

Re: venvs vs. package management

2024-05-20 Thread Left Right via Python-list
There are several independent problems here: 1. Very short release cycle. This is independent of the Python venv module but is indirectly influenced by Python's own release cycle. Package maintainers don't have time for proper testing, they are encouraged to release a bunch of new (and poorly

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-20 Thread Peter J. Holzer via Python-list
On 2024-05-20 00:26:03 +0200, Roel Schroeven via Python-list wrote: > Skip Montanaro via Python-list schreef op 20/05/2024 om 0:08: > > > Modern debian (ubuntu) and fedora block users installing using pip. > > > > Even if you're telling it to install in ~/.local? I could see not allowing > > to

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Thomas Passin via Python-list
On 5/19/2024 6:00 PM, Karsten Hilbert via Python-list wrote: Am Sun, May 19, 2024 at 10:45:09PM +0100 schrieb Barry via Python-list: On 18 May 2024, at 16:27, Peter J. Holzer via Python-list wrote: I don't think Linux users have to deal with venvs Modern debian (ubuntu) and fedora block

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Thomas Passin via Python-list
On 5/19/2024 6:34 PM, Grant Edwards via Python-list wrote: On 2024-05-19, Barry via Python-list wrote: On 18 May 2024, at 16:27, Peter J. Holzer via Python-list wrote: I don't think Linux users have to deal with venvs Modern debian (ubuntu) and fedora block users installing using pip.

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Thomas Passin via Python-list
On 5/19/2024 6:08 PM, Skip Montanaro via Python-list wrote: Modern debian (ubuntu) and fedora block users installing using pip. Even if you're telling it to install in ~/.local? I could see not allowing to run it as root. I honestly haven't tried. Maybe I should... 樂 I have an old laptop

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Grant Edwards via Python-list
On 2024-05-19, Barry via Python-list wrote: > > >> On 18 May 2024, at 16:27, Peter J. Holzer via Python-list >> wrote: >> >> I don't think Linux users have to deal with venvs > > Modern debian (ubuntu) and fedora block users installing using pip. You can't even use pip to do "user" installs?

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Grant Edwards via Python-list
On 2024-05-19, Gilmeh Serda via Python-list wrote: > On Sun, 19 May 2024 08:32:46 +0100, Alan Gauld wrote: > >> I've honestly never experienced this "nightmare". >> I install stuff and it just works. > > Hear! Hear! Me too! And all that. > > I'm on Manjaro, which is a tad finicky about other

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Roel Schroeven via Python-list
Skip Montanaro via Python-list schreef op 20/05/2024 om 0:08: Modern debian (ubuntu) and fedora block users installing using pip. > Even if you're telling it to install in ~/.local? I could see not allowing to run it as root. I assumed pip install --user would work, but no. I tried it (on

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Skip Montanaro via Python-list
Modern debian (ubuntu) and fedora block users installing using pip. > Even if you're telling it to install in ~/.local? I could see not allowing to run it as root. I honestly haven't tried. Maybe I should... 樂 I have an old laptop running XUbuntu 22.04 which I generally only use to compile the

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Karsten Hilbert via Python-list
Am Sun, May 19, 2024 at 10:45:09PM +0100 schrieb Barry via Python-list: > > On 18 May 2024, at 16:27, Peter J. Holzer via Python-list > > wrote: > > > > I don't think Linux users have to deal with venvs > > Modern debian (ubuntu) and fedora block users installing using pip. > You must use a

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Barry via Python-list
> On 18 May 2024, at 16:27, Peter J. Holzer via Python-list > wrote: > > I don't think Linux users have to deal with venvs Modern debian (ubuntu) and fedora block users installing using pip. You must use a venv to pip install packages from pypi now. This is implemented in python and pip and

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Dan Sommers via Python-list
On 2024-05-19 at 18:13:23 +, Gilmeh Serda via Python-list wrote: > Was there a reason they chose the name Pip? Package Installer for Python https://pip.pypa.io/en/stable/index.html -- https://mail.python.org/mailman/listinfo/python-list

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread MRAB via Python-list
On 2024-05-19 19:13, Gilmeh Serda via Python-list wrote: On Sun, 19 May 2024 08:32:46 +0100, Alan Gauld wrote: I've honestly never experienced this "nightmare". I install stuff and it just works. Hear! Hear! Me too! And all that. I'm on Manjaro, which is a tad finicky about other people

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Dan Sommers via Python-list
On 2024-05-19 at 18:13:23 +, Gilmeh Serda via Python-list wrote: > Was there a reason they chose the name Pip? Package Installer for Python https://pip.pypa.io/en/stable/index.html Every time I see PIP, I think Peripheral Interchange Program, but I'm old. --

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Thomas Passin via Python-list
On 5/19/2024 3:32 AM, Alan Gauld via Python-list wrote: On 18/05/2024 19:12, Piergiorgio Sartor via Python-list wrote: [snip] The dependency nightmare created by python, pip and all the rest cannot be resolved otherwise. I've honestly never experienced this "nightmare". I install stuff

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Grant Edwards via Python-list
On 2024-05-19, Alan Gauld via Python-list wrote: >> The dependency nightmare created by python, pip >> and all the rest cannot be resolved otherwise. > > I've honestly never experienced this "nightmare". > I install stuff and it just works. Same here. I occasonlly use pip to install something

Re: venvs vs. package management

2024-05-19 Thread Piergiorgio Sartor via Python-list
On 19/05/2024 08.49, Peter J. Holzer wrote: [...] That's what package management on Linux is for. Sure, it means that you won't have the newest version of anything and some packages not at all, but you don't have to care about dependencies. Or updates. Well, that doesn't work as well.

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-19 Thread Alan Gauld via Python-list
On 18/05/2024 19:12, Piergiorgio Sartor via Python-list wrote: >> So venvs make managing all that pretty convenient. Dunno why everybody's >> so down on venvs... Not so much down on them, they are just one extra step that's mostly not needed(in my use case) > Only people which are *not* using

venvs vs. package management (was: Terminal Emulator (Posting On Python-List Prohibited))

2024-05-19 Thread Peter J. Holzer via Python-list
On 2024-05-18 20:12:33 +0200, Piergiorgio Sartor via Python-list wrote: > On 18/05/2024 20.04, Mats Wichmann wrote: > > So venvs make managing all that pretty convenient. Dunno why everybody's > > so down on venvs... > > Only people which are *not* using python... :-) > > In my experience, venvs

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-18 Thread Piergiorgio Sartor via Python-list
On 18/05/2024 20.04, Mats Wichmann wrote: [...] So venvs make managing all that pretty convenient. Dunno why everybody's so down on venvs... Only people which are *not* using python... :-) In my experience, venvs is the only possible way to use python properly. The dependency nightmare

Re: Terminal Emulator

2024-05-18 Thread Piergiorgio Sartor via Python-list
On 14/05/2024 19.44, Gordinator wrote: I wish to write a terminal emulator in Python. I am a fairly competent Python user, and I wish to try a new project idea. What references can I use when writing my terminal emulator? I wish for it to be a true terminal emulator as well, not just a Tk text

Re: PyCon

2024-05-18 Thread Abdur-Rahmaan Janhangeer via Python-list
Two interesting ones: - Norwegian library: https://fosstodon.org/@osdotsystem/112459312723574625 - One about if Ai will take our jobs, using py to find out and she concludes it will On Sat, 18 May 2024, 14:15 Chris Angelico via Python-list, < python-list@python.org> wrote: > On Sun, 19 May 2024

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-18 Thread Grant Edwards via Python-list
On 2024-05-18, Mats Wichmann via Python-list wrote: > Distros have do offer a good selection of packaged Python bits, yes, but > only for the version of Python that's "native" to that distro release. > If you need to test other versions of Python, you're mostly on your own. For a few years I

Re: PyCon

2024-05-18 Thread Chris Angelico via Python-list
On Sun, 19 May 2024 at 04:10, Abdur-Rahmaan Janhangeer via Python-list wrote: > > Yes, this year's pretty exciting, great keynotes, great lightnings, great > location, great even sponsor talks (thought they would be pumping a lot of > marketing, but the ones i went were pretty awesome

Re: PyCon

2024-05-18 Thread Abdur-Rahmaan Janhangeer via Python-list
Yes, this year's pretty exciting, great keynotes, great lightnings, great location, great even sponsor talks (thought they would be pumping a lot of marketing, but the ones i went were pretty awesome technically) Organization side pretty smooth as well  On Fri, 17 May 2024, 20:58 Larry Martell

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-18 Thread Mats Wichmann via Python-list
On 5/18/24 10:48, Grant Edwards via Python-list wrote: On 2024-05-18, Peter J. Holzer via Python-list wrote: On 2024-05-16 19:46:07 +0100, Gordinator via Python-list wrote: To be fair, the problem is the fact that they use Windows (but I guess Linux users have to deal with venvs, so we're

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-18 Thread Grant Edwards via Python-list
On 2024-05-18, Peter J. Holzer via Python-list wrote: > On 2024-05-16 19:46:07 +0100, Gordinator via Python-list wrote: > >> To be fair, the problem is the fact that they use Windows (but I >> guess Linux users have to deal with venvs, so we're even. > > I don't think Linux users have to deal

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-18 Thread Peter J. Holzer via Python-list
On 2024-05-16 19:46:07 +0100, Gordinator via Python-list wrote: > To be fair, the problem is the fact that they use Windows (but I guess Linux > users have to deal with venvs, so we're even. I don't think Linux users have to deal with venvs any more than Windows users. Maybe even less because

Re: Terminal Emulator

2024-05-18 Thread Peter J. Holzer via Python-list
On 2024-05-14 22:37:17 +0200, Mirko via Python-list wrote: > Am 14.05.24 um 19:44 schrieb Gordinator via Python-list: > > I wish to write a terminal emulator in Python. I am a fairly competent > > Python user, and I wish to try a new project idea. What references can I > > use when writing my

Re: Terminal Emulator

2024-05-18 Thread Peter J. Holzer via Python-list
On 2024-05-14 16:03:33 -0400, Grant Edwards via Python-list wrote: > On 2024-05-14, Alan Gauld via Python-list wrote: > > On 14/05/2024 18:44, Gordinator via Python-list wrote: > > > >> I wish to write a terminal emulator in Python. I am a fairly > >> competent Python user, and I wish to try a

Re: PyCon

2024-05-18 Thread Chris Angelico via Python-list
On Sat, 18 May 2024 at 21:44, Skip Montanaro via Python-list wrote: > > > > > > I’m at PyCon in Pittsburgh and I’m haven’t an amazing time! > > > > s/haven’t/having/ > > > > No need to explain/correct. We understand you are excited. Many of us have > been in the same state before. ;-) > We're

Re: PyCon

2024-05-18 Thread Skip Montanaro via Python-list
> > > I’m at PyCon in Pittsburgh and I’m haven’t an amazing time! > > s/haven’t/having/ > No need to explain/correct. We understand you are excited. Many of us have been in the same state before. ;-) Enjoy, Skip > -- https://mail.python.org/mailman/listinfo/python-list

Re: PyCon

2024-05-17 Thread Larry Martell via Python-list
LOn Fri, May 17, 2024 at 8:57 PM Larry Martell wrote: > I’m at PyCon in Pittsburgh and I’m haven’t an amazing time! s/haven’t/having/ -- https://mail.python.org/mailman/listinfo/python-list

PyCon

2024-05-17 Thread Larry Martell via Python-list
I’m at PyCon in Pittsburgh and I’m haven’t an amazing time! -- https://mail.python.org/mailman/listinfo/python-list

Re: Terminal Emulator (Posting On Python-List Prohibited)

2024-05-16 Thread Gordinator via Python-list
On 16/05/2024 01:12, Lawrence D'Oliveiro wrote: On 15 May 2024 10:31:25 GMT, Stefan Ram wrote: We need somethin like a portable curses module (plus colorama) and it has got to work on both Windoze and Linux straight out of the box in standard Python. Something else for Windows Python users

Re: Version of NymPy

2024-05-16 Thread Left Right via Python-list
Let me try to answer this properly, instead of "simply". The "problematic" part of your question is "with my Anaconda distribution". Anaconda distribution comes with the conda program that manages installed packages. A single Anaconda distribution may have multiple NumPy versions installed at the

Re: Terminal Emulator

2024-05-16 Thread Gordinator via Python-list
We need somethin like a portable curses module (plus colorama) Agreed, getting curses to work on Windows is SUCH a pain, and I don't think I've ever done it. Naturally, as a Linux user, I don't find much need to do it anyway. Colorama would also be cool in the standard library as well. I

Re: Version of NymPy

2024-05-15 Thread MRAB via Python-list
On 2024-05-15 19:42, Popov, Dmitry Yu via Python-list wrote: What would be the easiest way to learn which version of NumPy I have with my Anaconda distribution? Import numpy and print its '__version__' attribute. -- https://mail.python.org/mailman/listinfo/python-list

Re: Version of NymPy

2024-05-15 Thread Popov, Dmitry Yu via Python-list
Thank you. From: Larry Martell Sent: Wednesday, May 15, 2024 1:55 PM To: Popov, Dmitry Yu Cc: Popov, Dmitry Yu via Python-list Subject: Re: Version of NymPy On Wed, May 15, 2024 at 2: 43 PM Popov, Dmitry Yu via Python-list wrote: > > What would be the easiest

Re: Version of NymPy

2024-05-15 Thread Larry Martell via Python-list
On Wed, May 15, 2024 at 2:43 PM Popov, Dmitry Yu via Python-list wrote: > > What would be the easiest way to learn which version of NumPy I have with my > Anaconda distribution? >>> import numpy >>> numpy.__version__ '1.24.4' -- https://mail.python.org/mailman/listinfo/python-list

Version of NymPy

2024-05-15 Thread Popov, Dmitry Yu via Python-list
What would be the easiest way to learn which version of NumPy I have with my Anaconda distribution? -- https://mail.python.org/mailman/listinfo/python-list

Re: Terminal Emulator

2024-05-14 Thread Cameron Simpson via Python-list
On 14May2024 18:44, Gordinator wrote: I wish to write a terminal emulator in Python. I am a fairly competent Python user, and I wish to try a new project idea. What references can I use when writing my terminal emulator? I wish for it to be a true terminal emulator as well, not just a Tk text

RE: Terminal Emulator

2024-05-14 Thread AVI GROSS via Python-list
The topic was to re-invent the wheel yet again and create a terminal emulator. I hesitate to say this but one approach is to consider the curses module as described by our very own Alan Gauld in a book: https://www.amazon.com/Programming-curses-Python-Alan-Gauld-ebook/dp/B091B85 B77 The topic

Re: Terminal Emulator

2024-05-14 Thread Mirko via Python-list
Am 14.05.24 um 19:44 schrieb Gordinator via Python-list: I wish to write a terminal emulator in Python. I am a fairly competent Python user, and I wish to try a new project idea. What references can I use when writing my terminal emulator? I wish for it to be a true terminal emulator as well,

Re: Terminal Emulator

2024-05-14 Thread Grant Edwards via Python-list
On 2024-05-14, Alan Gauld via Python-list wrote: > On 14/05/2024 18:44, Gordinator via Python-list wrote: > >> I wish to write a terminal emulator in Python. I am a fairly >> competent Python user, and I wish to try a new project idea. What >> references can I use when writing my terminal

Re: Terminal Emulator

2024-05-14 Thread Grant Edwards via Python-list
On 2024-05-14, Alan Gauld via Python-list wrote: > On 14/05/2024 18:44, Gordinator via Python-list wrote: > >> I wish to write a terminal emulator in Python. I am a fairly >> competent Python user, and I wish to try a new project idea. What >> references can I use when writing my terminal

Re: Terminal Emulator

2024-05-14 Thread Alan Gauld via Python-list
On 14/05/2024 18:44, Gordinator via Python-list wrote: > I wish to write a terminal emulator in Python. I am a fairly competent > Python user, and I wish to try a new project idea. What references can I > use when writing my terminal emulator? I wish for it to be a true > terminal emulator as

Terminal Emulator

2024-05-14 Thread Gordinator via Python-list
I wish to write a terminal emulator in Python. I am a fairly competent Python user, and I wish to try a new project idea. What references can I use when writing my terminal emulator? I wish for it to be a true terminal emulator as well, not just a Tk text widget or something like that. If you

Re: help

2024-05-13 Thread Thomas Passin via Python-list
On 5/12/2024 7:56 PM, Enrder via Python-list wrote: good tader I need help to install the bcml, and is that after installing the python and I go to the command prompt and put ''pip install bcml'' to install it tells me "pip" is not recognized as an internal or external command,

help

2024-05-13 Thread Enrder via Python-list
good tader I need help to install the bcml, and is that after installing the python and I go to the command prompt and put ''pip install bcml'' to install it tells me "pip" is not recognized as an internal or external command, program or executable batch file. I have tried

Re: Issues with uninstalling python versions on windows server

2024-05-10 Thread Mats Wichmann via Python-list
On 5/10/24 03:39, Tripura Seersha via Python-list wrote: Hi Barry, Automation is using the system account using which the installation is failing with exit code 3. This account has the administrative privileges. Please help me with this issue. Thanks, Seersha You probably have a better

Re: Issues with uninstalling python versions on windows server

2024-05-10 Thread Tripura Seersha via Python-list
Hi Barry, Automation is using the system account using which the installation is failing with exit code 3. This account has the administrative privileges. Please help me with this issue. Thanks, Seersha From: Python-list on behalf of Tripura Seersha via

[RELEASE] Python 3.13.0 beta 1 released

2024-05-08 Thread Thomas Wouters via Python-list
After a little bit of excitement discovering new bugs during the release, *it’s done*: 3.13.0 beta 1 is released, the 3.13 branch has been created, and features for 3.13 are frozen! The main branch is now 3.14.0a0. https://www.python.org/downloads/release/python-3130b1/ *This is a beta preview of

Re: Use of statement 'global' in scripts.

2024-05-08 Thread Popov, Dmitry Yu via Python-list
Thank you! From: Python-list on behalf of Greg Ewing via Python-list Sent: Wednesday, May 8, 2024 3:56 AM To: python-list@python.org Subject: Re: Use of statement 'global' in scripts. On 8/05/24 1: 32 pm, Popov, Dmitry Yu wrote: > The statement 'global',

Re: Use of statement 'global' in scripts.

2024-05-08 Thread Greg Ewing via Python-list
On 8/05/24 1:32 pm, Popov, Dmitry Yu wrote: The statement 'global', indicating variables living in the global scope, is very suitable to be used in modules. I'm wondering whether in scripts, running at the top-level invocation of the interpreter, statement 'global' is used exactly the same

Use of statement 'global' in scripts.

2024-05-07 Thread Popov, Dmitry Yu via Python-list
Dear Sirs. The statement 'global', indicating variables living in the global scope, is very suitable to be used in modules. I'm wondering whether in scripts, running at the top-level invocation of the interpreter, statement 'global' is used exactly the same way as in modules? If there are any

Re: Issues with uninstalling python versions on windows server

2024-05-07 Thread Tripura Seersha via Python-list
Hi Barry, Yes, the install was for specific user. As suggested by you, when I installed a version for all users, I was able to uninstall from the account used for automation successfully. Thank you for the help on this issue. However, for installation the account being used in automation has

Re: Python Dialogs

2024-05-06 Thread Chris Angelico via Python-list
On Tue, 7 May 2024 at 03:42, jak via Python-list wrote: > > Loris Bennett ha scritto: > > r...@zedat.fu-berlin.de (Stefan Ram) writes: > > > >>Me (indented by 2) and the chatbot (flush left). Lines lengths > 72! > > > > Is there a name for this kind of indentation, i.e. the stuff you are > >

Re: how to discover what values produced an exception?

2024-05-06 Thread Chris Angelico via Python-list
On Tue, 7 May 2024 at 03:38, Alan Bawden via Python-list wrote: > A good error message shouldn't withhold any information that can > _easily_ be included. Debugging is more art than science, so there is > no real way to predict what information might prove useful in solving > the crime. I

Re: Python Dialogs

2024-05-06 Thread jak via Python-list
Loris Bennett ha scritto: r...@zedat.fu-berlin.de (Stefan Ram) writes: Me (indented by 2) and the chatbot (flush left). Lines lengths > 72! Is there a name for this kind of indentation, i.e. the stuff you are writing not being flush left? It is sort of contrary to what I think of as

Re: Python Dialogs

2024-05-06 Thread jak via Python-list
Stefan Ram ha scritto: r...@zedat.fu-berlin.de (Stefan Ram) wrote or quoted: translation services are gonna interpret line breaks as I just beefed up my posting program to replace "gonna". Now I won't come across like some street thug, but rather as a respectable member of human

Re: how to discover what values produced an exception?

2024-05-06 Thread Left Right via Python-list
From a practical perspective: not all values are printable (especially if printing a value results in an error: then you'd lose the original error, so, going crazy with printing of errors is usually not such a hot idea). But, if you want the values: you'd have to examine the stack, extract the

Re: how to discover what values produced an exception?

2024-05-06 Thread Alan Bawden via Python-list
Thomas Passin writes: On 5/3/2024 9:56 AM, Johanne Fairchild via Python-list wrote: > How to discover what values produced an exception? Or perhaps---why > doesn't the Python traceback show the values involved in the TypeError? > For instance: > >

Re: Issues with uninstalling python versions on windows server

2024-05-04 Thread Mats Wichmann via Python-list
On 5/3/24 05:55, Tripura Seersha via Python-list wrote: Hi Team, I am working on an automation related to uninstalling and installing python versions on different windows servers. I have observed that uninstallation is working only with the account/login using which the python version is

Re: Python Dialogs

2024-05-04 Thread Peter J. Holzer via Python-list
On 2024-05-02 16:34:38 +0200, Loris Bennett via Python-list wrote: > r...@zedat.fu-berlin.de (Stefan Ram) writes: > > Me (indented by 2) and the chatbot (flush left). Lines lengths > 72! > > Is there a name for this kind of indentation, i.e. the stuff you are > writing not being flush left?

Re: how to discover what values produced an exception?

2024-05-04 Thread Dan Sommers via Python-list
On 2024-05-03 at 10:56:39 -0300, Johanne Fairchild via Python-list wrote: > How to discover what values produced an exception? Or perhaps---why > doesn't the Python traceback show the values involved in the TypeError? > For instance: > >

Re: how to discover what values produced an exception?

2024-05-04 Thread Dieter Maurer via Python-list
Johanne Fairchild wrote at 2024-5-3 10:56 -0300: >How to discover what values produced an exception? Or perhaps---why >doesn't the Python traceback show the values involved in the TypeError? >For instance: > >--8<>8--- (0,0) < 4

Re: how to discover what values produced an exception?

2024-05-03 Thread Thomas Passin via Python-list
On 5/3/2024 9:56 AM, Johanne Fairchild via Python-list wrote: How to discover what values produced an exception? Or perhaps---why doesn't the Python traceback show the values involved in the TypeError? For instance: --8<>8--- (0,0) < 4

Re: Issues with uninstalling python versions on windows server

2024-05-03 Thread Barry via Python-list
> On 3 May 2024, at 17:43, Tripura Seersha via Python-list > wrote: > > Hi Team, > > I am working on an automation related to uninstalling and installing python > versions on different windows servers. > > I have observed that uninstallation is working only with the account/login > using

how to discover what values produced an exception?

2024-05-03 Thread Johanne Fairchild via Python-list
How to discover what values produced an exception? Or perhaps---why doesn't the Python traceback show the values involved in the TypeError? For instance: --8<>8--- >>> (0,0) < 4 Traceback (most recent call last): File "", line 1, in

Re: Python Dialogs (Posting On Python-List Prohibited)

2024-05-03 Thread Alan Bawden via Python-list
Lawrence D'Oliveiro writes: > Assume you have an expression "s.replace('a','b').replace('c','d'). > replace('e','f').replace('g','h')". Its value is a string which > is the value of s, but with "a" replaced by "b", "c" replaced by > "d", "e" replaced by "f" and "g" replaced by "h".

Re: Python Dialogs

2024-05-03 Thread Loris Bennett via Python-list
r...@zedat.fu-berlin.de (Stefan Ram) writes: > Me (indented by 2) and the chatbot (flush left). Lines lengths > 72! Is there a name for this kind of indentation, i.e. the stuff you are writing not being flush left? It is sort of contrary to what I think of as "normal" indentation. You seem

Issues with uninstalling python versions on windows server

2024-05-03 Thread Tripura Seersha via Python-list
Hi Team, I am working on an automation related to uninstalling and installing python versions on different windows servers. I have observed that uninstallation is working only with the account/login using which the python version is installed. But for automation, we are not aware which

Re: UTF_16 question

2024-05-01 Thread jak via Python-list
Richard Damon ha scritto: On Apr 29, 2024, at 12:23 PM, jak via Python-list wrote: Hi everyone, one thing that I do not understand is happening to me: I have some text files with different characteristics, among these there are that they have an UTF_32_le coding, utf_32be, utf_16_le,

<    1   2   3   4   5   6   7   8   9   10   >