Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

maybe something like this Python snippet below – used before the first time you try 'html()' – will do the trick for you; here it is working in a quick test...

try:
    # if old_html ist not yet defined
    old_html == None
except NameError:
    # set it to the current html function
    old_html = html
    # and define a wrapper
    def html(*args):
        pretty_print(old_html(*args))

# now try results
old_html('Suppose we wanted to calculate $2+2=4$')
html('Suppose we wanted to calculate $2+2=4$')