'Initialize an GDAL/OGR driver on either a string or integer input.'

def __init__(self, dr_input):

    if isinstance(dr_input, str):
        self.ensure_registered()
        if (dr_input.lower() in self._alias):
            name = self._alias[dr_input.lower()]
        else:
            name = dr_input
        for iface in (vcapi, rcapi):
            driver = c_void_p(iface.get_driver_by_name(force_bytes(name)))
            if driver:
                break
    elif isinstance(dr_input, int):
        self.ensure_registered()
        for iface in (vcapi, rcapi):
            driver = iface.get_driver(dr_input)
            if driver:
                break
    elif isinstance(dr_input, c_void_p):
        driver = dr_input
    else:
        raise GDALException(('Unrecognized    input    type    for    GDAL/OGR    Driver:    %s' % type(dr_input)))
    if (not driver):
        raise GDALException(('Could    not    initialize    GDAL/OGR    Driver    on    input:    %s' % dr_input))
    self.ptr = driver
