Re: Buffering HTML as HTMLParser reads it?

2007-08-05 Thread chrispwd
On Aug 1, 4:08 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Aug 1, 1:31 pm, [EMAIL PROTECTED] wrote: > > > > > > I'm thinking maybe somehow haveHTMLParserappend each character it > > reads except for data inside tags in some kind of buffer? This way I > > can have the HTML contents read into a

Buffering HTML as HTMLParser reads it?

2007-08-01 Thread chrispwd
Hello, I am working on a project where I'm using python to parse HTML pages, transforming data between certain tags. Currently the HTMLParser class is being used for this. In a nutshell, its pretty simple -- I'm feeding the contents of the HTML page to HTMLParser, then I am overriding the appropri

Re: Reading files, splitting on a delimiter and newlines.

2007-07-25 Thread chrispwd
On Jul 25, 7:56 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Jul 25, 8:46 am, [EMAIL PROTECTED] wrote: > > > > > Hello, > > > I have a situation where I have a file that contains text similar to: > > > myValue1 = contents of value1 > > myValue2 = contents of value2 but > >

Reading files, splitting on a delimiter and newlines.

2007-07-25 Thread chrispwd
Hello, I have a situation where I have a file that contains text similar to: myValue1 = contents of value1 myValue2 = contents of value2 but with a new line here myValue3 = contents of value3 My first approach was to open the file, use readlines to split the lines on the