#NEWLINE# def HandleVarsDoc( request , response ) : #NEWLINE# #INDENT# 'Renders /varsdoc page with documentation for exported variables.' #NEWLINE# title = 'All Variables' #NEWLINE# if ( request . get ( 'output' , '' ) == 'text' ) : #NEWLINE# #INDENT# response . headers . add_header ( 'Content-Type' , 'text/plain; charset=UTF-8' ) #NEWLINE# response . start_response ( 200 ) #NEWLINE# response . out . write ( ( _HTML_HEADER % response ) ) #NEWLINE# response . out . write ( vars_export . GetAllDocPlain ( ) ) #NEWLINE# response . out . write ( _HTML_FOOTER ) #NEWLINE# response . end_response ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# response . headers . add_header ( 'Content-Type' , 'text/html; charset=UTF-8' ) #NEWLINE# response . start_response ( 200 ) #NEWLINE# response . out . write ( ( _HTML_HEADER % title ) ) #NEWLINE# response . out . write ( vars_export . GetAllDocHTML ( ) ) #NEWLINE# response . out . write ( _HTML_FOOTER ) #NEWLINE# response . end_response ( )