from mechanize import Browser br = Browser() br.open(\'http://somewebpage\') html = br.response().readlines() for line in html: print line
When p
You can use either a different HTML parser (like lxml, or Beautiful Soup) -- one that offers functions to extract just text. Or, you can run a regex on your line string that strips out the tags. See Python docs for more.