parameters: (self, file)
return_statement: return doc
docstring: Parse a document from a file object, returning the document
          node.
docstring_summary: Parse a document from a file object, returning the document
          node.
docstring_tokens: Parse a document from a file object returning the document node .
function: def parseFile(self, file):
          """Parse a document from a file object, returning the document
          node."""
          parser = self.getParser()
          first_buffer = True
          try:
              while 1:
                  buffer = file.read(16*1024)
                  if not buffer:
                      break
                  parser.Parse(buffer, 0)
                  if first_buffer and self.document.documentElement:
                      self._setup_subset(buffer)
                  first_buffer = False
              parser.Parse("", True)
          except ParseEscape:
              pass
          doc = self.document
          self.reset()
          self._parser = None
          return doc
function_tokens: def parseFile ( self , file ) : parser = self . getParser ( ) first_buffer = True try : while 1 : buffer = file . read ( 16 * 1024 ) if not buffer : break parser . Parse ( buffer , 0 ) if first_buffer and self . document . documentElement : self . _setup_subset ( buffer ) first_buffer = False parser . Parse ( "" , True ) except ParseEscape : pass doc = self . document self . reset ( ) self . _parser = None return doc