parameters: (self, modname, directory, params=None)
docstring: Render this module template to ``dest`` with the provided
           rendering parameters
docstring_summary: Render this module template to ``dest`` with the provided
           rendering parameters
docstring_tokens: Render this module template to dest with the provided rendering parameters
function: def render_to(self, modname, directory, params=None):
          """ Render this module template to ``dest`` with the provided
           rendering parameters
          """
          # overwrite with local
          for path, content in self.files():
              local = os.path.relpath(path, self.path)
              # strip .template extension
              root, ext = os.path.splitext(local)
              if ext == '.template':
                  local = root
              dest = os.path.join(directory, modname, local)
              destdir = os.path.dirname(dest)
              if not os.path.exists(destdir):
                  os.makedirs(destdir)
  
              with open(dest, 'wb') as f:
                  if ext not in ('.py', '.xml', '.csv', '.js', '.rst', '.html', '.template'):
                      f.write(content)
                  else:
                      env.from_string(content.decode('utf-8'))\
                         .stream(params or {})\
                         .dump(f, encoding='utf-8')
function_tokens: def render_to ( self , modname , directory , params = None ) : # overwrite with local for path , content in self . files ( ) : local = os . path . relpath ( path , self . path ) # strip .template extension root , ext = os . path . splitext ( local ) if ext == '.template' : local = root dest = os . path . join ( directory , modname , local ) destdir = os . path . dirname ( dest ) if not os . path . exists ( destdir ) : os . makedirs ( destdir ) with open ( dest , 'wb' ) as f : if ext not in ( '.py' , '.xml' , '.csv' , '.js' , '.rst' , '.html' , '.template' ) : f . write ( content ) else : env . from_string ( content . decode ( 'utf-8' ) ) . stream ( params or { } ) . dump ( f , encoding = 'utf-8' )