Strip HTML tags?

Fazer faizan at
Sun Dec 14 20:57:32 CET 2003

BW Glitch <bwglitch at> wrote in message news:<brgkln$33crt$1 at>...
> Fazer wrote:
> > Hello,
> > 
> > I was wondering what would be the easiest way to strip away HTML tags from a string?
> > 
> > Or how would I remove everything between < and > also the < , > as well using regex?
> You could use the SGMLparser for that also. Check the Python Cookbook at 
> ASPN ( ) for a recipe 
> that uses it ( 
> ).
> -- 
> Glitch
> G+++ G1 G2+ BW++++ MW++ BM+ Rid+ Arm-- FR+ FW-
> #3 D+ ADA N++ W OQP MUSH- BC- CN++ OM P75
> "Waspinator negative negative negative! I am Shrapnel, Decepticon
> hero-o-o-o!"
> "Shrapnel? That was a Decepticon from the Great War three centuries
> ago! ..."
>          -- A loopy Waspinator and Blackarachnia, "Dark Designs"

Thanks!  The recipe works out fine!  The problem is that I saved the
class in a file and I want it to be included in my other script.  How
can that be done?  My other script is in the same directory as the
class and doing import <name of class> doesn't work.

Any ideas?


More information about the Python-list mailing list