#NEWLINE# def generate_index( api = True , single = False , **kwds ) : #NEWLINE# #INDENT# from jinja2 import Template #NEWLINE# with open ( 'source/index.rst.template' ) as f : #NEWLINE# #INDENT# t = Template ( f . read ( ) ) #NEWLINE# #UNINDENT# with open ( 'source/index.rst' , 'w' ) as f : #NEWLINE# #INDENT# f . write ( t . render ( api = api , single = single , ** kwds ) )