Text over multiple lines

Diez B. Roggisch deetsNOSPAM at web.de
Sun Jun 20 09:26:33 EDT 2004


Rigga wrote:

> Hi,
> 
> I am using the HTMLParser to parse a web page, part of the routine I need
> to write (I am new to Python) involves looking for a particular tag and
> once I know the start and the end of the tag then to assign all the data
> in between the tags to a variable, this is easy if the tag starts and ends
> on the same line however how would I go about doing it if its split over
> two or more lines?


What difference does it make that the text is spread over more than one
line? Just collect the data in handle_data. 

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list