#NEWLINE# def __call__( self , topic = None ) : #NEWLINE# #INDENT# title = text = None #NEWLINE# if ( topic is not None ) : #NEWLINE# #INDENT# import pydoc #NEWLINE# pydoc . help ( topic ) #NEWLINE# rv = sys . stdout . reset ( ) . decode ( 'utf-8' , 'ignore' ) #NEWLINE# paragraphs = _paragraph_re . split ( rv ) #NEWLINE# if ( len ( paragraphs ) > 1 ) : #NEWLINE# #INDENT# title = paragraphs [ 0 ] #NEWLINE# text = '\n\n' . join ( paragraphs [ 1 : ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# title = 'Help' #NEWLINE# text = paragraphs [ 0 ] #NEWLINE# #UNINDENT# #UNINDENT# rv = render_template ( 'help_command.html' , title = title , text = text ) #NEWLINE# sys . stdout . _write ( title )