import HTMLParser
import cgi
#unescape
escape_txt =’<abc>’
hp= HTMLParser.HTMLParser ()
unescape_txt = hp.unescape(escape_txt )
#escape
escape_txt = cgi.escape(unescape_txt)
import HTMLParser
import cgi
#unescape
escape_txt =’<abc>’
hp= HTMLParser.HTMLParser ()
unescape_txt = hp.unescape(escape_txt )
#escape
escape_txt = cgi.escape(unescape_txt)