code: def createOutputBuffer(file, encoding):
      
      ret = libxml2mod.xmlCreateOutputBuffer(file, encoding)
      if ret is None:raise treeError('xmlCreateOutputBuffer() failed')
      return outputBuffer(_obj=ret)
docs: Create a libxml2 output buffer from a Python file