[Tutor] Web Page Scraping

2016-05-23 Thread Crusier
Dear All, I am trying to scrape a web site using Beautiful Soup. However, BS doesn't show any of the data. I am just wondering if it is Javascript or some other feature which hides all the data. I have the following questions: 1) Please advise how to scrape the following data from the website:

Re: [Tutor] Python 3: string to decimal conversion

2016-05-23 Thread cs
On 23May2016 12:18, Saidov wrote: Thanks everyone for all your help. This solved my problem with parenthesis and $ signs in the data: if not row[4]: pass else: try: expenses[ts.Date(row[0]).month] += decimal.Decimal(row

Re: [Tutor] Python 3: string to decimal conversion

2016-05-23 Thread US
Thanks everyone for all your help. This solved my problem with parenthesis and $ signs in the data: if not row[4]: pass else: try: expenses[ts.Date(row[0]).month] += decimal.Decimal(row[4].strip('()$ ,').replace(',',''

Re: [Tutor] which is best python 2 or python3

2016-05-23 Thread Steven D'Aprano
On Mon, May 23, 2016 at 01:24:21PM +0530, Palanikumar Gopalakrishnan wrote: > Hi buddies, > I read one article on internet which is said python 2 > and python3 is totally different in programming. > As a beginner which i prefer for my learning, python 2 or python3 ? They are n

Re: [Tutor] Python 3: string to decimal conversion

2016-05-23 Thread Peter Otten
US wrote: > Thank you both for suggesting a way to handle errors. I have run the > suggested code. What I learned is that all the values (not only empty > cells) seem to be invalid for decimal.Decimal function. > > I tried the float() function instead of decimal.Decimal and got an > error message

Re: [Tutor] which is best python 2 or python3

2016-05-23 Thread Alan Gauld via Tutor
On 23/05/16 08:54, Palanikumar Gopalakrishnan wrote: > Hi buddies, > I read one article on internet which is said python 2 > and python3 is totally different in programming. > As a beginner which i prefer for my learning, python 2 or python3 ? Nowadays the only real justificat

Re: [Tutor] Python 3: string to decimal conversion

2016-05-23 Thread Alan Gauld via Tutor
On 23/05/16 02:45, US wrote: > I tried the float() function instead of decimal.Decimal and got an > error message: could not convert string to float: '($75.59)'. The problem is that the functions don;t recognize the parens as a negative sign. You will need to convert them yourself. I suggest you

Re: [Tutor] Python 3: string to decimal conversion

2016-05-23 Thread US
On Sun, May 22, 2016 at 5:36 PM, wrote: > On 22May2016 08:19, Saidov wrote: >> >> Thank you all for the useful feedback. I am new to programming so bear >> with me while I learn the rules... >> >> I have run Cameron's code to print the values and have the traceback >> results. please see below.

[Tutor] which is best python 2 or python3

2016-05-23 Thread Palanikumar Gopalakrishnan
Hi buddies, I read one article on internet which is said python 2 and python3 is totally different in programming. As a beginner which i prefer for my learning, python 2 or python3 ? -- ___ Tutor maillist - Tutor@python.org To unsu