Re: [Tutor] self.name is calling the __set__ method of another class

2019-04-29 Thread Cameron Simpson
On 29Apr2019 23:25, Arup Rakshit wrote: In the following code, class attributes name and email is set to the instances of NonBlank. class NonBlank: def __init__(self, storage_name): self.storage_name = storage_name def __set__(self, instance, value): if not

Re: [Tutor] feedparser in python

2019-04-29 Thread nathan tech
Hi there, After reading your email, I did some further investigation, I first did this test:     import feedparser     import time     def tim(url): k=time.time() feedparser.parse(url) return time.time()-k The results were as follows:     tim( a url): 2.9 seconds  

Re: [Tutor] What does 'Bind Return Key' do?

2019-04-29 Thread Mike Barnett
You'll find it discussed in a couple of places in the PySimpleGUI documentation. For example, this was written about it under the Button Element section of the docs: -- The ENTER key : The ENTER key is an important part of data entry for windows.

Re: [Tutor] self.name is calling the __set__ method of another class

2019-04-29 Thread Steven D'Aprano
On Tue, Apr 30, 2019 at 12:47:02AM +0530, Arup Rakshit wrote: > I really didn't write that code by myself. The day I'll you will not see > me here everyday :) . I was watching a PyCon video > https://youtu.be/81S01c9zytE?t=8172 where the author used this code. But > his explanation is not

Re: [Tutor] self.name is calling the __set__ method of another class

2019-04-29 Thread Arup Rakshit
On 29/04/19 11:40 PM, Steven D'Aprano wrote: On Mon, Apr 29, 2019 at 11:25:51PM +0530, Arup Rakshit wrote: Now I am not getting how the __set__() method from NonBlank is being called inside the __init__() method. Looks like some magic is going on under the hood. Can anyone please explain this

Re: [Tutor] self.name is calling the __set__ method of another class

2019-04-29 Thread Steven D'Aprano
On Mon, Apr 29, 2019 at 11:25:51PM +0530, Arup Rakshit wrote: > Now I am not getting how the __set__() method from NonBlank is being > called inside the __init__() method. Looks like some magic is going on > under the hood. Can anyone please explain this how self.name and > self.email

[Tutor] self.name is calling the __set__ method of another class

2019-04-29 Thread Arup Rakshit
Hi, In the following code, class attributes name and email is set to the instances of NonBlank. class NonBlank: def __init__(self, storage_name): self.storage_name = storage_name def __set__(self, instance, value): if not isinstance(value, str): raise

Re: [Tutor] feedparser in python

2019-04-29 Thread Mats Wichmann
On 4/28/19 6:26 PM, nathan tech wrote: > Hello everyone, > > Most recently, I have started work using feedparser. > > I noticed, almost straight away, it's a  bit slow. > > For instance: > >     url="http://feeds.bbci.co.uk/news/rss.xml; > >     f1=feedparser.parse(url) > > > On some

Re: [Tutor] Help request ERROR installing beautifulsoup

2019-04-29 Thread Mats Wichmann
On 4/29/19 1:44 AM, Alan Gauld via Tutor wrote: > On 28/04/2019 17:11, Dr. Luca T wrote: > ^ >> SyntaxError: Missing parentheses in call to 'print'. Did you mean >> print("Unit tests have failed!")? >> > >> I use windows

Re: [Tutor] feedparser in python

2019-04-29 Thread Alan Gauld via Tutor
On 29/04/2019 01:26, nathan tech wrote: > Most recently, I have started work using feedparser. I've never heard of it let alone used it so there may be another forum where you can get specific answers. But let me ask... > I noticed, almost straight away, it's a  bit slow. How do you measure

Re: [Tutor] Help request ERROR installing beautifulsoup

2019-04-29 Thread Alan Gauld via Tutor
On 28/04/2019 17:11, Dr. Luca T wrote: ^ > SyntaxError: Missing parentheses in call to 'print'. Did you mean > print("Unit tests have failed!")? > > I use windows 10, python 3.7.3 ... The problem is you are running python

Re: [Tutor] Help request ERROR installing beautifulsoup

2019-04-29 Thread Peter Otten
Dr. Luca T wrote: > Hi, > i'm new in python, i tried to install beautifulsoup but i had back this > error: > > ERROR: Complete output from command python setup.py egg_info: > ERROR: Traceback (most recent call last): > File "", line 1, in > File >

Re: [Tutor] What does 'Bind Return Key' do?

2019-04-29 Thread Peter Otten
Matthew Polack wrote: > Hi, > > We're learning Python with PySimpleGUi and have used this example > program... > > https://github.com/PySimpleGUI/PySimpleGUI/blob/master/ProgrammingClassExamples/Win10%20versions/1d%20PSG%20(named%20input%20keys%20and%20catch%20errors).py > > > There is a

[Tutor] feedparser in python

2019-04-29 Thread nathan tech
Hello everyone, Most recently, I have started work using feedparser. I noticed, almost straight away, it's a  bit slow. For instance:     url="http://feeds.bbci.co.uk/news/rss.xml;     f1=feedparser.parse(url) On some feeds, this can take a few seconds, on the talk python to me feed, it

[Tutor] Help request ERROR installing beautifulsoup

2019-04-29 Thread Dr. Luca T
Hi, i'm new in python, i tried to install beautifulsoup but i had back this error: ERROR: Complete output from command python setup.py egg_info: ERROR: Traceback (most recent call last): File "", line 1, in File

[Tutor] What does 'Bind Return Key' do?

2019-04-29 Thread Matthew Polack
Hi, We're learning Python with PySimpleGUi and have used this example program... https://github.com/PySimpleGUI/PySimpleGUI/blob/master/ProgrammingClassExamples/Win10%20versions/1d%20PSG%20(named%20input%20keys%20and%20catch%20errors).py There is a mystery command that says: