'Returns the index of the given field name.'

def index(self, field_name):

    i = capi.get_field_index(self.ptr, field_name)
    if (i < 0):
        raise OGRIndexError(('invalid    OFT    field    name    given:    "%s"' % field_name))
    return i
