Re: Help, PyCharm fails to recognize my tab setting...See attached picture of the code.

2022-10-11 Thread dn
On 11/10/2022 10.48, Kevin M. Wilson via Python-list wrote: C:\Users\kevin\PycharmProjects\Myfuturevalue\venv\Scripts\python.exe C:\Users\kevin\PycharmProjects\Myfuturevalue\FutureValueCal.py   File "C:\Users\kevin\PycharmProjects\Myfuturevalue\FutureValueCal.py", line 31    elif (years > 50.0

Re: for -- else: what was the motivation?

2022-10-11 Thread Axy via Python-list
On 10/10/2022 06:15, avi.e.gr...@gmail.com wrote: Chris, a short(er) answer to your addition below. I did not at first share your perception but maybe do now. If the argument was that ELSE and other constructs like FINALLY or CATCH are horrible because they follow other code and important thin

Re: flattening lists

2022-10-11 Thread Dan Stromberg
On Tue, Oct 11, 2022 at 12:48 PM SquidBits _ wrote: > Does anyone else think there should be a flatten () function, which just > turns a multi-dimensional list into a one-dimensional list in the order > it's in. e.g. > > [[1,2,3],[4,5,6,7],[8,9]] becomes [1,2,3,4,5,6,7,8,9]. > > I have had to fla

Re: How to fix Python error, The term '.../python.exe' is not recognized as the name of a cmdlet, function, script file, or operable program, in VS Code?

2022-10-11 Thread Eryk Sun
On 10/11/22, LouisAden Capellupo via Python-list wrote: > Variables. > C:\Users\It'sMeLil'Loui\AppData\Local\Programs\Python\Python310\Scripts\, > and C:\Users\It'sMeLil'Loui\AppData\Local\Programs\Python\Python310\. I suggest that you switch to a user account that doesn't have single quotes in

How to fix Python error, The term '.../python.exe' is not recognized as the name of a cmdlet, function, script file, or operable program, in VS Code?

2022-10-11 Thread LouisAden Capellupo via Python-list
Hi! I've just downloaded and installed Python 3.10.7 (64-bit) for Windows 10 from python.org. I'm quite new but, I've already downloaded and installed Visual Studio Code as well. I have included the two paths for python under User Variables.  C:\Users\It'sMeLil'Loui\AppData\Local\Programs\P

Re: flattening lists

2022-10-11 Thread MRAB
On 2022-10-11 21:09, Stefan Ram wrote: r...@zedat.fu-berlin.de (Stefan Ram) writes: . I never understood "yield from" until just now, when I was thinking, "Maybe this could be the piece that fits in here!" PS: If I'm starting to think about it: Having succeeded after using it by trial in

Re: for -- else: what was the motivation?

2022-10-11 Thread Grant Edwards
On 2022-10-11, wrote: > But is that native python or some extension where "|" has been modified to > mean something other than a form of OR in some places? The latter. > What module do you need to load to make that happen? The provided link is for a page that shows the module and explains the

Re: What to use for finding as many syntax errors as possible.

2022-10-11 Thread Cameron Simpson
On 11Oct2022 17:45, Thomas Passin wrote: Personally, I'd most likely go for a decent programming editor that you can set up to run a program on your file, use that to run a checker, like pyflakes for instance, and run that from time to time. You could run it when you save a file. Even if it

Re: What to use for finding as many syntax errors as possible.

2022-10-11 Thread Thomas Passin
On 10/11/2022 5:09 PM, Thomas Passin wrote: The OP wants to get help with problems in his files even if it isn't perfect, and I think that's reasonable to wish for.  The link to a post about the lezer parser in a recent message on this thread is partly about how a real, practical parser can do

Re: What to use for finding as many syntax errors as possible.

2022-10-11 Thread Thomas Passin
On 10/11/2022 4:00 PM, Chris Angelico wrote: On Wed, 12 Oct 2022 at 05:23, Thomas Passin wrote: On 10/11/2022 3:10 AM, avi.e.gr...@gmail.com wrote: I see resemblances to something like how a web page is loaded and operated. I mean very different but at some level not so much. I mean a typica

Re: flattening lists

2022-10-11 Thread dn
On 12/10/2022 08.32, SquidBits _ wrote: Does anyone else think there should be a flatten () function, which just turns a multi-dimensional list into a one-dimensional list in the order it's in. e.g. [[1,2,3],[4,5,6,7],[8,9]] becomes [1,2,3,4,5,6,7,8,9]. I have had to flatten lists quite a few

Re: Cannot import gdal in jupyter notebook

2022-10-11 Thread MRAB
On 2022-10-11 20:38, Thomas Passin wrote: On Windows, when I tried to install gdal using pip, it needed to compile part of it. I'm not set up with the Microsoft compiler and header files, so that failed. If you are on Windows, you will need to look for a binary wheel to install, or install and

Re: flattening lists

2022-10-11 Thread Thomas Passin
Is this what you usually do? l1 = [[1,2,3],[4,5,6,7],[8,9]] l2 = [] for lz in l1: l2.extend(lz) print(l2) # [1,2,3,4,5,6,7,8,9] Not all that "tedious", perhaps... I tend to accumulate little utilities like this in a file and point to it with a .pth file. Of course, you have to remember

Re: for -- else: what was the motivation?

2022-10-11 Thread dn
On 10/10/2022 16.19, avi.e.gr...@gmail.com wrote: I won't reply to everything Dave says and especially not the parts I fully agree with. I think in many situations in life there is no ONE way to do things so most advice is heuristic at best and many exceptions may exist depending on your chos

Re: flattening lists

2022-10-11 Thread David Lowry-Duda
On Tue, Oct 11, 2022 at 12:32:23PM -0700, SquidBits _ wrote: Does anyone else think there should be a flatten () function, which just turns a multi-dimensional list into a one-dimensional list in the order it's in. e.g. [[1,2,3],[4,5,6,7],[8,9]] becomes [1,2,3,4,5,6,7,8,9]. I have had to flatt

Re: What to use for finding as many syntax errors as possible.

2022-10-11 Thread Chris Angelico
On Wed, 12 Oct 2022 at 05:23, Thomas Passin wrote: > > On 10/11/2022 3:10 AM, avi.e.gr...@gmail.com wrote: > > I see resemblances to something like how a web page is loaded and operated. > > I mean very different but at some level not so much. > > > > I mean a typical web page is read in as HTML w

Re: flattening lists

2022-10-11 Thread Larry Martell
On Tue, Oct 11, 2022 at 12:48 PM SquidBits _ wrote: > > Does anyone else think there should be a flatten () function, which just > turns a multi-dimensional list into a one-dimensional list in the order it's > in. e.g. > > [[1,2,3],[4,5,6,7],[8,9]] becomes [1,2,3,4,5,6,7,8,9]. > > I have had to

[RELEASE] Python versions 3.10.8, 3.9.15, 3.8.15, 3.7.15 now available

2022-10-11 Thread Łukasz Langa
Déjà vu? Right, a month after the expedited releases we are doing the dance again. This coincides with the regular scheduled time for 3.10.8 but since we accrued a few fixes in 3.7 - 3.9 as well, we’re again releasing all four editions at the same time. We’re not promising to continue at this pa

flattening lists

2022-10-11 Thread SquidBits _
Does anyone else think there should be a flatten () function, which just turns a multi-dimensional list into a one-dimensional list in the order it's in. e.g. [[1,2,3],[4,5,6,7],[8,9]] becomes [1,2,3,4,5,6,7,8,9]. I have had to flatten lists quite a few times and it's quite tedious to type out.

Re: Cannot import gdal in jupyter notebook

2022-10-11 Thread Thomas Passin
On Windows, when I tried to install gdal using pip, it needed to compile part of it. I'm not set up with the Microsoft compiler and header files, so that failed. If you are on Windows, you will need to look for a binary wheel to install, or install and configure the compiler and header files.

[Meeting] Problem-solving, perspectives, programming, and presentation, 19Oct

2022-10-11 Thread dn
With all that "p"-alliteration, it must be a Pppresentation with the virtual-Auckland branch of NZPUG! Wed 19 Oct, 1800 for 1830 ~ 2030 NZDT 0500, 0530, and 0730 UTC+13 resp by web-conference Nathan Smith had an 'itch' caused by a problem related to the game of Scrabble. Solving a problem with

Re: What to use for finding as many syntax errors as possible.

2022-10-11 Thread Thomas Passin
On 10/11/2022 3:10 AM, avi.e.gr...@gmail.com wrote: I see resemblances to something like how a web page is loaded and operated. I mean very different but at some level not so much. I mean a typical web page is read in as HTML with various keyword regions expected such as ... or ... with thin

Please remove me from the python list

2022-10-11 Thread evagreven16
-- https://mail.python.org/mailman/listinfo/python-list

RE: for -- else: what was the motivation?

2022-10-11 Thread avi.e.gross
Anton, Your example overlaps with the use of generators in Python to do variants of the same pipeline ideas. But is that native python or some extension where "|" has been modified to mean something other than a form of OR in some places? What module do you need to load to make that happen? I t

Cannot import gdal in jupyter notebook

2022-10-11 Thread Abdul Haseeb Azizi
Hi everyone, I am new to python and I am trying to utilize this code "from osgeo import gdal". I installed python 3.10 and also I installed anaconda3 to solve this matter but I could not succeed. When I run that code I get the following error. -

Re: WG: Modify setup window

2022-10-11 Thread Mats Wichmann
On 10/11/22 01:20, evagreve...@gmail.com wrote: Hi, this window comes up every time I try to run the code. I am not sure how to solve it. I tried to repair and modify but it didn´t change anything. We don't know what you're asking, because this list doesn't forward images. You'll ne

WG: Modify setup window

2022-10-11 Thread evagreven16
Hi, this window comes up every time I try to run the code. I am not sure how to solve it. I tried to repair and modify but it didn´t change anything. Kind regards, Eva -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-11 Thread Antoon Pardon
Op 10/10/2022 om 04:38 schreef avi.e.gr...@gmail.com: [This is an answer for Peter and can easily be skipped by those who know or have no wish to.] Strictly speaking Peter, the word "pipe" may not mean quite something in Python but other concepts like chaining may be better. The original use

Re: What to use for finding as many syntax errors as possible.

2022-10-11 Thread Chris Angelico
On Tue, 11 Oct 2022 at 18:12, wrote: > > Thanks for a rather detailed explanation of some of what we have been > discussing, Chris. The overall outline is about what I assumed was there but > some of the details were, to put it politely, fuzzy. > > I see resemblances to something like how a web pa

Re: What to use for finding as many syntax errors as possible.

2022-10-11 Thread Weatherby,Gerard
Sure it does. They’re optional and not enforced at runtime, but I find them useful when writing code in PyCharm: import os from os import DirEntry de : DirEntry for de in os.scandir('/tmp'): print(de.name) de = 7 print(de) Predeclaring de allows me to do the tab completion thing with DirEn

Re: What to use for finding as many syntax errors as possible.

2022-10-11 Thread Antoon Pardon
Op 10/10/2022 om 19:08 schreef Robert Latest via Python-list: Antoon Pardon wrote: I would like a tool that tries to find as many syntax errors as possible in a python file. I'm puzzled as to when such a tool would be needed. How many syntax errors can you realistically put into a single Pyt

Re: What to use for finding as many syntax errors as possible.

2022-10-11 Thread Roel Schroeven
Op 10/10/2022 om 19:08 schreef Robert Latest via Python-list: Antoon Pardon wrote: > I would like a tool that tries to find as many syntax errors as possible > in a python file. I'm puzzled as to when such a tool would be needed. How many syntax errors can you realistically put into a single P

RE: What to use for finding as many syntax errors as possible.

2022-10-11 Thread avi.e.gross
Thanks for a rather detailed explanation of some of what we have been discussing, Chris. The overall outline is about what I assumed was there but some of the details were, to put it politely, fuzzy. I see resemblances to something like how a web page is loaded and operated. I mean very different