Re: [Tutor] Parsing html tables and using numpy for subsequent processing

2009-09-17 Thread David Kim
> > Gerard wrote: > Not very pretty, but I imagine there are very few pretty examples of > this kind of thing. I'll add more comments...honest. Nothing obviously > wrong with your code to my eyes. > Many thanks gerard, appreciate you looking it over. I'll take a look at the link you posted as well

Re: [Tutor] Parsing html tables and using numpy for subsequent processing

2009-09-16 Thread Gerard Flanagan
David Kim wrote: Hello all, I've finally gotten around to my 'learn how to parse html' project. For those of you looking for examples (like me!), hopefully it will show you one potentially thickheaded way to do it. [...] The code can be found at pastebin: http://financialpython.pastebin.com

Re: [Tutor] Parsing html tables and using numpy for subsequentprocessing

2009-09-16 Thread Alan Gauld
"David Kim" wrote > The code can be found at pastebin: > http://financialpython.pastebin.com/f4efd8930 Nothing to do with the parsing but I noticed: def get_files(path): ''' Get a list of all files in a given directory. Returns a list of filename strings. ''' files = os

[Tutor] Parsing html tables and using numpy for subsequent processing

2009-09-15 Thread David Kim
Hello all, I've finally gotten around to my 'learn how to parse html' project. For those of you looking for examples (like me!), hopefully it will show you one potentially thickheaded way to do it. For those of you with powerful python-fu, I would appreciate any feedback regarding the direction I

Re: [Tutor] parsing html.

2008-01-16 Thread Paul McGuire
Here is a pyparsing approach to your question. I've added some comments to walk you through the various steps. By using pyparsing's makeHTMLTags helper method, it is easy to write short programs to skim selected data tags from out of an HTML page. -- Paul from pyparsing import makeHTMLTags, Sk

Re: [Tutor] parsing html.

2008-01-16 Thread Kent Johnson
Shriphani Palakodety wrote: > Hello, > I have a html document here which goes like this: > > Table of Contents > . > Preface > > Can someone tell me how I can get the string between the tag for > an a tag for a given value of the name attribute. In [30]: from BeautifulSoup import Beauti

Re: [Tutor] parsing html.

2008-01-16 Thread Alan Gauld
"Shriphani Palakodety" <[EMAIL PROTECTED]> wrote in > I have a html document here which goes like this: > > Table of Contents > . > Preface > > Can someone tell me how I can get the string between the tag for > an a tag for a given value of the name attribute. Heres an example using the

[Tutor] parsing html.

2008-01-15 Thread Shriphani Palakodety
Hello, I have a html document here which goes like this: Table of Contents . Preface Can someone tell me how I can get the string between the tag for an a tag for a given value of the name attribute. Thanks, Shriphani Palakodety ___ Tutor mail

Re: [Tutor] Parsing html user HTMLParser

2006-04-20 Thread Danny Yoo
> I need help here, I'm struggling with html parsing method, up until now > I can only put and html file as instance. I have no experience with > this, I want to read the childs inside this document and modify the > data. What can I do if I start from here? Hi Titvirak, You might want to tak

Re: [Tutor] Parsing html user HTMLParser

2006-04-20 Thread Kent Johnson
ទិត្យវិរៈ wrote: > Hi folks, > > I need help here, I'm struggling with html parsing method, up until now > I can only put and html file as instance. I have no experience with > this, I want to read the childs inside this document and modify the > data. What can I do if I start from here? > >> fro

[Tutor] Parsing html user HTMLParser

2006-04-20 Thread ទិត្យវិរៈ
Hi folks, I need help here, I'm struggling with html parsing method, up until now I can only put and html file as instance. I have no experience with this, I want to read the childs inside this document and modify the data. What can I do if I start from here? > from HTMLParser import HTMLParser >