Popular recipes by Ádám Szieberth http://code.activestate.com/recipes/users/4188745/2013-12-17T23:02:37-08:00ActiveState Code RecipesPretty and Stated HTMLParsers (Python) 2013-12-14T00:28:36-08:00Ádám Szieberthhttp://code.activestate.com/recipes/users/4188745/http://code.activestate.com/recipes/578787-pretty-and-stated-htmlparsers/ <p style="color: grey"> Python recipe 578787 by <a href="/recipes/users/4188745/">Ádám Szieberth</a> (<a href="/recipes/tags/html/">html</a>, <a href="/recipes/tags/htmlparser/">htmlparser</a>, <a href="/recipes/tags/state/">state</a>). Revision 2. </p> <p>Extensions of html.parser.HTMLParser().</p> <p>PrettyHTMLParser() does not splits data into chuncks by HTML entities. StatedHTMLParser() can have many state-dependent handlers which helps parsing HTML pages alot.</p> No more UnicodeDecodeErrors when printing (Python) 2013-12-17T23:02:37-08:00Ádám Szieberthhttp://code.activestate.com/recipes/users/4188745/http://code.activestate.com/recipes/578788-no-more-unicodedecodeerrors-when-printing/ <p style="color: grey"> Python recipe 578788 by <a href="/recipes/users/4188745/">Ádám Szieberth</a> (<a href="/recipes/tags/decode/">decode</a>, <a href="/recipes/tags/error/">error</a>, <a href="/recipes/tags/print/">print</a>, <a href="/recipes/tags/terminal/">terminal</a>, <a href="/recipes/tags/unicode/">unicode</a>). Revision 2. </p> <p>I hate getting UnicodeDecodeErrors when I use print() for bugtracing or for some other reason. I decided to make a module which spares me the headache.</p>