code: def createInputBuffer(file, encoding):
      
      ret = libxml2mod.xmlCreateInputBuffer(file, encoding)
      if ret is None:raise treeError('xmlCreateInputBuffer() failed')
      return inputBuffer(_obj=ret)
docs: Create a libxml2 input buffer from a Python file