Create a libxml2 output buffer from a Python file

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