#NEWLINE# def write_doc( self ) : #NEWLINE# #INDENT# ' Entry point of the object: goes throught the module and\n            writes the docs to the disk.\n        ' #NEWLINE# self . to_document = set ( [ name for ( name , func ) in getmembers ( self . module ) if ( ( not ( ( name [ : 5 ] == 'test_' ) or ( name [ 0 ] == '_' ) ) ) and callable ( func ) ) ] ) #NEWLINE# outfile = file ( os . sep . join ( [ self . out_dir , self . filename ] ) , 'w' ) #NEWLINE# outfile . write ( self . header ) #NEWLINE# outfile . write ( ( '\n\n.. module:: %s\n\n.. toctree::\n\n' % self . module . __name__ ) ) #NEWLINE# if ( submodule . sub_modules_titles is None ) : #NEWLINE# #INDENT# self . sub_modules_titles = [ '' for submodule in self . sub_modules ] #NEWLINE# #UNINDENT# if ( self . sub_headers is None ) : #NEWLINE# #INDENT# self . sub_headers = [ '' for submodule in self . sub_modules ] #NEWLINE# #UNINDENT# if ( self . sub_filenames is None ) : #NEWLINE# #INDENT# self . sub_filenames = [ '%s.rst' for submodule in self . sub_modules ] #NEWLINE# #UNINDENT# for ( submodule , header , filename , title ) in zip ( self . sub_modules , self . sub_headers , self . sub_filenames , self . sub_modules_titles ) : #NEWLINE# #INDENT# self . write_doc_submodule ( filename , title = title , header = header , submodulename = submodule ) #NEWLINE# outfile . write ( ( '\t%s\n' % filename ) ) #NEWLINE# #UNINDENT# if ( self . misc_filename is None ) : #NEWLINE# #INDENT# misc_filename = ( self . module . __name__ + '.misc' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# misc_filename = self . misc_filename #NEWLINE# #UNINDENT# self . write_doc_submodule ( misc_filename , title = self . misc_title ) #NEWLINE# if ( self . misc_title is None ) : #NEWLINE# #INDENT# outfile . write ( ( '\n\n.. include:: %s\n\n' % misc_filename ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# outfile . write ( ( '\t%s\n' % misc_filename ) ) #NEWLINE# #UNINDENT# outfile . write ( self . footer ) #NEWLINE# outfile . write ( '\n\n' )