def build_html_page(classified_text, title='python', css=default_css, html=default_html):
 css_str = '\n'.join([('%s %s' % item) for item in css.items()])
 result = html_highlight(classified_text)
 title = cgi.escape(title)
 return html.format(title=title, css=css_str, body=result)

def build_html_page ( classified_text , title = 'python' , css = default_css , html = default_html ) : css_str = '\n' . join ( [ ( '%s %s' % item ) for item in css . items ( ) ] ) result = html_highlight ( classified_text ) title = cgi . escape ( title ) return html . format ( title = title , css = css_str , body = result )
create a complete html page with colorized source code .