low-level python hacker and author of RPyC,Construct and Plumbum. writes
about python, algorithms,
software architecture and whatever else comes to mind.
A very simple and straight-forward text/HTML codec. When encoding text, it escapes all
HTML-delimiters (< becomes <, etc.), so the encoded text can be safely viewed by an
HTML renderer (browser) or safely embedded into an HTML document. When decoding HTML, it
unescapes the formatters into plain text (so that > becomes > again, etc.).
Code
Example
This module can be used as a standalone module
Or you can place it in your interpreter’s directory, as for instance, and then use