Re: Rotation of a cube

2021-07-29 Thread Greg Ewing
On 30/07/21 5:57 am, Michael F. Stemper wrote: I would like to animate the rotation of a 3-cube.ng each step. However, it seems to me that this is a solved problem, so there is probably a module that will do most of the scutwork for me. You might find something useful here: https://medium.com

How do I modify a bar graph?

2021-07-29 Thread Steve
The following code is from the site: https://matplotlib.org/stable/gallery/index.html bar graph. Sometimes I want to project a graph that contains almost 100 elements. The program shows everything crammed into a default size graph. Can I modify the size of the graph and make it longer? Also,

Re: Subtle difference between any(a list) and any(a generator) with Python 3.9

2021-07-29 Thread Chris Angelico
On Fri, Jul 30, 2021 at 5:40 AM Terry Reedy wrote: > Since the 'two ways' involve the new :=, I have no idea what 'two ways' > and 'same result' you mean before :=. > I'm not sure, but I think that a lot of people read patch notes as if they say "this is how everyone needs to do things now", and

Re: Subtle difference between any(a list) and any(a generator) with Python 3.9

2021-07-29 Thread Terry Reedy
On 7/29/2021 5:39 AM, Unknown wrote: Hello Reading PEP572 about Python 3.9 assignment expressions, I discovered a subtle difference between any(a list) and any(a generator) see: >>> lines = ["azerty", "#qsdfgh", "wxcvbn"] >>> any((comment := line).startswith('#') for line in lines) True >>>

Rotation of a cube

2021-07-29 Thread Michael F. Stemper
I would like to animate the rotation of a 3-cube. I know how to do animation with pygame. My first thought was to set up a cube as a list of coordinates, and then project those coordinates onto a plane by ray-tracing from a viewpoint. I could then incrementally rotate it using the rotation matrix[

Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py

2021-07-29 Thread Dennis Lee Bieber
On Thu, 29 Jul 2021 15:45:26 +0200, Peter Otten <__pete...@web.de> declaimed the following: >On 28/07/2021 18:40, Dennis Lee Bieber wrote: >> On Wed, 28 Jul 2021 09:04:40 +0200, Peter Otten <__pete...@web.de> >> declaimed the following: >> >>> >>> Perhaps it has something to do with the X-No-Arch

Re: a clean exit

2021-07-29 Thread Dieter Maurer
jak wrote at 2021-7-29 00:07 +0200: > ... >Thanks to both of you for the replies. I know the rules you described to >me for process synchronization but unfortunately, due to the structure >of the library I am using, I cannot apply them. I can't even use >try/except because the library, when the err

Re: [Errno 2] No such file or directory:

2021-07-29 Thread joseph pareti
indeed. There are better options than the one I attempted. Thanks for the advice Am Mi., 28. Juli 2021 um 18:19 Uhr schrieb Chris Angelico : > On Thu, Jul 29, 2021 at 2:10 AM joseph pareti > wrote: > > > > The following code fails as shown in the title: > > > > > > > > > > > > > > *import subpro

Re: Generate a Google Translate API token through the Socks5 proxy using gtoken.py

2021-07-29 Thread Peter Otten
On 28/07/2021 18:40, Dennis Lee Bieber wrote: On Wed, 28 Jul 2021 09:04:40 +0200, Peter Otten <__pete...@web.de> declaimed the following: Perhaps it has something to do with the X-No-Archive flag set by Dennis? According to my properties page in Agent, I've turned that off except if

Fast help with Python program

2021-07-29 Thread Arak Rachael
Hi guys, I need fast help with this, can you please look at it? I don't get how to visualize on the 3 axis in the for cycle with the list of colors and count of colors that I get from my array. And I also don't get how to cluster the colors based on how many colors there are in the second arra

Re: Subtle difference between any(a list) and any(a generator) with Python 3.9

2021-07-29 Thread Chris Angelico
On Thu, Jul 29, 2021 at 7:49 PM ast wrote: > > Hello > > Reading PEP572 about Python 3.9 assignment expressions, > I discovered a subtle difference between any(a list) > and any(a generator) > > see: > > >>> lines = ["azerty", "#qsdfgh", "wxcvbn"] > >>> any((comment := line).startswith('#') for

Subtle difference between any(a list) and any(a generator) with Python 3.9

2021-07-29 Thread ast
Hello Reading PEP572 about Python 3.9 assignment expressions, I discovered a subtle difference between any(a list) and any(a generator) see: >>> lines = ["azerty", "#qsdfgh", "wxcvbn"] >>> any((comment := line).startswith('#') for line in lines) True >>> comment "#qsdfgh" >>> any([(comment :=

Re: Trying to read from a text file to generate a graph

2021-07-29 Thread Anssi Saari
"Steve" writes: > I am going though a struggle with this and just don't see where it fails. It seems to me you're putting your data into strings when you need to put it into lists. And no, adding brackets and commas to your strings so that printing out the strings makes them look like lists does

RE: Trying to read from a text file to generate a graph

2021-07-29 Thread Steve
Thank you, the responses here have been extremely helpful. Steve Footnote: There's 99 bugs in the code, in the code. 99 bugs in the code. Take one down and patch it all around. Now there's 117 bugs in the

Re: a simple question

2021-07-29 Thread Sean DiZazzo
On Tuesday, July 27, 2021 at 5:05:27 AM UTC-7, Terry Reedy wrote: > On 7/26/2021 6:19 PM, Glenn Wilson via Python-list wrote: > > I recently downloaded the latest version of python, 3.9.6. Everything works > > except, the turtle module. I get an error message every time , I use basic > > command