[Tutor] (no subject)

2012-11-07 Thread steve clarke
Hi, I am trying to write a programme to count how many times a random point lies within the positive sector of a circle. So far I can display if the point lies inside the area but I need something to allow me to count the total number of items that lie inside the area. My programme is:>>> impor

Re: [Tutor] (no subject)

2012-11-07 Thread Oscar Benjamin
It's good to give your email a subject line that describes what you're doing. On 7 November 2012 11:53, steve clarke wrote: > Hi, I am trying to write a programme to count how many times a random point > lies within the positive sector of a circle. So far I can display if the > point lies inside

[Tutor] web scraping using Python and urlopen in Python 3.3

2012-11-07 Thread Seema V Srivastava
Hi, I am new to Python, trying to learn it by carrying out specific tasks. I want to start with trying to scrap the contents of a web page. I have downloaded Python 3.3 and BeautifulSoup 4. If I call upon urlopen in any form, such as below, I get the error as shown below the syntax: Does urlope

Re: [Tutor] web scraping using Python and urlopen in Python 3.3

2012-11-07 Thread Walter Prins
Seema, On 7 November 2012 15:44, Seema V Srivastava wrote: > Hi, > I am new to Python, trying to learn it by carrying out specific tasks. I > want to start with trying to scrap the contents of a web page. I have > downloaded Python 3.3 and BeautifulSoup 4. > > If I call upon urlopen in any for

Re: [Tutor] web scraping using Python and urlopen in Python 3.3

2012-11-07 Thread Dave Angel
On 11/07/2012 10:44 AM, Seema V Srivastava wrote: > Hi, > I am new to Python, trying to learn it by carrying out specific tasks. I > want to start with trying to scrap the contents of a web page. I have > downloaded Python 3.3 and BeautifulSoup 4. > > If I call upon urlopen in any form, such as b

Re: [Tutor] web scraping using Python and urlopen in Python 3.3

2012-11-07 Thread Dave Angel
On 11/07/2012 11:25 AM, Walter Prins wrote: > Seema, > > On 7 November 2012 15:44, Seema V Srivastava wrote: > >> Hi, >> I am new to Python, trying to learn it by carrying out specific tasks. I >> want to start with trying to scrap the contents of a web page. I have >> downloaded Python 3.3 and

[Tutor] html table parse

2012-11-07 Thread wenhao
Hi ALL, I tied to use python to do some html parsing. More specifically, I want to extract data from some html tables. Could you give me some suggestions which library should use? I tried Beautiful Soup, but I couldn't find anything to do with table parsing. Thanks ! __

Re: [Tutor] html table parse

2012-11-07 Thread Christopher Conner
> Hi ALL, > > I tied to use python to do some html parsing. More specifically, I want to > extract data from some html tables. Could you give me some suggestions which > library should use? I tried Beautiful Soup, but I couldn't find anything to > do with table parsing. > > Thanks ! > > > > _

Re: [Tutor] html table parse

2012-11-07 Thread Joel Goldstick
I've used bs4 to extract data from a table, and found it pretty nice. Can you show some code with specific problems you encountered? On Wed, Nov 7, 2012 at 3:50 PM, Christopher Conner wrote: > > > Hi ALL, > > > > I tied to use python to do some html parsing. More specifically, I want > to > > e

Re: [Tutor] html table parse

2012-11-07 Thread Alan Gauld
On 07/11/12 20:50, Christopher Conner wrote: Python has a native HTML parser. http://docs.python.org/2/library/htmlparser.html It does, but frankly BS is much easier to use and more forgiving. I wouldn't recommend that the OP drop BS to use htmlparser To the OP, do you understand HTML? parsi