code: def render_file(self, filename):
          
          dirname, basename = split(filename)
          with changedir(dirname):
              infile = abspath(basename)
              outfile = abspath('.%s.html' % basename)
              self.docutils.publish_file(infile, outfile, self.styles)
              return outfile
docs: Convert a reST file to HTML.