Re: Button placement

2021-03-09 Thread Peter Otten
On 09/03/2021 03:08, Bischoop wrote: I try for a while place the top button in a a middle of column=0 with span to column2 below so the button being centered to those, I'm not sure what you mean, do you perhaps need columnspan=3? tried with canvas as well but with no success. Is someone wit

Best practices regarding PYTHONPATH

2021-03-09 Thread Larry Martell
Which is considered better? Having a long import path or setting PYTHONPATH? For example, in a project where 50% of the imports come from the same top level directory is it better to add that dir to the path or reference it in the import statements? -- https://mail.python.org/mailman/listinfo/pyt

Re: neonumeric - C++ arbitrary precision arithmetic library

2021-03-09 Thread Peter J. Holzer
On 2021-03-08 09:29:31 +0100, Mirko via Python-list wrote: > Am 07.03.2021 um 21:52 schrieb Avi Gross via Python-list: > > The precedence example used below made a strange assumption that the > > imaginary program would not be told up-front what computer language it was > > being asked to convert f

"unexpected argument"

2021-03-09 Thread Quentin Bock
Error 1: Space Invaders.py:90: SyntaxWarning: "is" with a literal. Did you mean "=="? if bullet_state is "fire": Error 2: line 66, in if event.key == pygame.K_SPACE: AttributeError: 'Event' object has no attribute 'key' Code: import pygame import random # Space Invaders! background = pyga

Re: "unexpected argument"

2021-03-09 Thread Peter Pearson
On Tue, 9 Mar 2021 15:03:54 -0500, Quentin Bock wrote: > Error 1: > Space Invaders.py:90: SyntaxWarning: "is" with a literal. Did you mean "=="? > if bullet_state is "fire": > > Error 2: > line 66, in > if event.key == pygame.K_SPACE: > AttributeError: 'Event' object has no attribute 'key'

Re: "unexpected argument"

2021-03-09 Thread MRAB
On 2021-03-09 20:03, Quentin Bock wrote: Error 1: Space Invaders.py:90: SyntaxWarning: "is" with a literal. Did you mean "=="? if bullet_state is "fire": Error 2: line 66, in if event.key == pygame.K_SPACE: AttributeError: 'Event' object has no attribute 'key' Code: import pygame impor

Re: Button placement

2021-03-09 Thread Terry Reedy
On 3/8/2021 9:08 PM, Bischoop wrote: I try for a while place the top button in a a middle of column=0 with span to column2 below so the button being centered to those, tried with canvas as well but with no success. Is someone with Tkinter experience able to advice what I could do? Say more cle

How to loop over a text file (to remove tags and normalize) using Python

2021-03-09 Thread S Monzur
Dear List, Newbie here. I am trying to loop over a text file to remove html tags, punctuation marks, stopwords. I have already used Beautiful Soup (Python v 3.8.3) to scrape the text (newspaper articles) from the site. It returns a list that I saved as a file. However, I am not sure how to use a l

Re: python curses constant names for mouse wheel movements?

2021-03-09 Thread Alan Gauld via Python-list
On 09/03/2021 01:05, pjfarl...@earthlink.net wrote: > I am replying to my own message due to the digest not appearing in my inbox > yet today. I will add Alan Gould's responses and my reply to him manually. > Yes, when I talk about wheel up/down I do mean wheel rotation events, not > wheel-button

Re: Button placement

2021-03-09 Thread Bischoop
On 2021-03-09, Peter Otten <__pete...@web.de> wrote: > On 09/03/2021 03:08, Bischoop wrote: >> >> I try for a while place the top button in a a middle of column=0 with >> span to column2 below so the button being centered to those, > > I'm not sure what you mean, do you perhaps need columnspan=3?

Found a problem

2021-03-09 Thread Victor Dib
Olá, comunidade do Python! Meu nome é Victor Dib, e sou um estudante brasileiro de programação. Já entrei em contato com vocês hoje, e vocês solicitaram que eu me inscrevesse na lista de e-mails de vocês primeiro. Bom, isso já foi feito, então espero que agora vocês possam dar atenção ao meu ca

Re: Best practices regarding PYTHONPATH

2021-03-09 Thread Cameron Simpson
On 09Mar2021 05:00, Larry Martell wrote: >Which is considered better? Having a long import path or setting PYTHONPATH? > >For example, in a project where 50% of the imports come from the same top >level directory is it better to add that dir to the path or reference it in >the import statements?

Re: How to loop over a text file (to remove tags and normalize) using Python

2021-03-09 Thread Dan Ciprus (dciprus) via Python-list
If you could utilized pastebin or similar site to show your code, it would help tremendously since it's an unindented mess now and can not be read easily. On Wed, Mar 10, 2021 at 03:07:14AM +0600, S Monzur wrote: Dear List, Newbie here. I am trying to loop over a text file to remove html tags,

Re: Button placement

2021-03-09 Thread Richard Damon
On 3/9/21 6:24 AM, Bischoop wrote: > On 2021-03-09, Peter Otten <__pete...@web.de> wrote: >> On 09/03/2021 03:08, Bischoop wrote: >>> I try for a while place the top button in a a middle of column=0 with >>> span to column2 below so the button being centered to those, >> I'm not sure what you mean

Re: How to loop over a text file (to remove tags and normalize) using Python

2021-03-09 Thread S Monzur
Thank you and apologies! I did not realize how jumbled it was at the receiver's end. The code is now at this site : https://pastebin.com/wSi2xzBh I'm basically trying to do a few things with my code- 1. Extract 3 strings from the text- title, date and main text 2. Remove all tags

Re: How to loop over a text file (to remove tags and normalize) using Python

2021-03-09 Thread Dan Ciprus (dciprus) via Python-list
No problem, list just converts everything into plain/txt which is GREAT ! :-) So without digging deeply into what you need to do: I am assuming that your input contains html tags. Why don't you utilize lib like: https://pypi.org/project/beautifulsoup4/ instead of doing harakiri with parsing da

How to create both a c extension and a pure python package

2021-03-09 Thread Marco Sulla
As title. Currently I ended up using this trick in my setup.py: if len(argv) > 1 and argv[1] == "c": sys.argv = [sys.argv[0]] + sys.argv[2:] setuptools.setup(ext_modules = ext_modules, **common_setup_args) else: setuptools.setup(**common_setup_args) So if I pass "c" as the first arg

Re: Button placement

2021-03-09 Thread Bischoop
On 2021-03-09, Richard Damon wrote: > > One thing to remember is that span is sort of like range, range(3) is > [0, 1, 2] > Right, ends on 2. Thanks again, that ended mine frustration lol. -- Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: Button placement

2021-03-09 Thread Bischoop
On 2021-03-09, Terry Reedy wrote: > > Say more clearly what you want/expect and what you are getting and why > you are unhappy. > It solved Terry, I wanted center the button on top, had only 3 columns (0,1,2) and was unaware that I could use "columnspan=3" as it ends on 2, I was using columnspan

Getting Modify Setup message

2021-03-09 Thread Jaya Yogasundaram
Hello I just installed Python 3.9.2 on my computer a week ago . But I am getting the Modify Setup window pops up many times. How can I fix it. Let me know please. thanks Jaya *Please note that I am working remotely until further notice.* Jaya Yogasundaram, P.Eng. IWMS Support & Development In

Re: Please don't feed the trolls

2021-03-09 Thread Sam
On 3/8/21 3:35 PM, Chris Angelico wrote: On Tue, Mar 9, 2021 at 8:31 AM D'Arcy Cain wrote: On 2021-03-06 4:24 p.m., Terry Reedy wrote: Trolling, among other things, is fishing with a moving line, especially with a revolving lure, as from a moving boat. A troll, among other things, is that me

Re: Getting Modify Setup message

2021-03-09 Thread Igor Korot
Hi, On Tue, Mar 9, 2021 at 5:05 PM Jaya Yogasundaram wrote: > > Hello > > I just installed Python 3.9.2 on my computer a week ago . But I am getting > the Modify Setup window pops up many times. How can I fix it. Let me know > please. Are you trying to re-run the setup? What happens if you start

Re: Found a problem

2021-03-09 Thread MRAB
On 2021-03-09 20:16, Victor Dib wrote: Olá, comunidade do Python! [snip] def num_perf_inf(n): divisors = [] perfects = [] limit = n - 1 for i in range(1, limit): dividend = i + 1 for j in range(i): divisor = j + 1 if dividend % d

Re: Found a problem

2021-03-09 Thread dn via Python-list
On 10/03/2021 09.16, Victor Dib wrote: > Olá, comunidade do Python! Olá Victor! At which point we should switch to English, because this is an English-language list. (there may be Portuguese lists - I haven't looked) Please do not be afraid to write in English. There are many here who are quite

Re: "unexpected argument"

2021-03-09 Thread Terry Reedy
On 3/9/2021 3:03 PM, Quentin Bock wrote: Error 1: Space Invaders.py:90: SyntaxWarning: "is" with a literal. Did you mean "=="? if bullet_state is "fire": Multiple string objects can have the same string value. Just because bullet_state == 'fire' does not mean that it *is* the particular ob

Re: How to loop over a text file (to remove tags and normalize) using Python

2021-03-09 Thread S Monzur
Thanks! I ended up using beautiful soup to remove the html tags and create three lists (titles of article, publications dates, main body) but am still facing a problem where the list is not properly storing the main body. There is something wrong with my code for that section, and any comment would

Re: Please don't feed the trolls

2021-03-09 Thread dn via Python-list
On 10/03/2021 13.47, Dennis Lee Bieber wrote: > On Tue, 9 Mar 2021 16:57:52 -0600, Sam declaimed the > following: > >> On 3/8/21 3:35 PM, Chris Angelico wrote: >>> On Tue, Mar 9, 2021 at 8:31 AM D'Arcy Cain wrote: On 2021-03-06 4:24 p.m., Terry Reedy wrote: > Trolling, among other