'Initializes an OGR driver on either a string or integer input.'

def __init__(self, dr_input):

    if isinstance(dr_input, six.string_types):
        self._register()
        if (dr_input.lower() in self._alias):
            name = self._alias[dr_input.lower()]
        else:
            name = dr_input
        dr = capi.get_driver_by_name(force_bytes(name))
    elif isinstance(dr_input, int):
        self._register()
        dr = capi.get_driver(dr_input)
    elif isinstance(dr_input, c_void_p):
        dr = dr_input
    else:
        raise OGRException(('Unrecognized    input    type    for    OGR    Driver:    %s' % str(type(dr_input))))
    if (not dr):
        raise OGRException(('Could    not    initialize    OGR    Driver    on    input:    %s' % str(dr_input)))
    self.ptr = dr
