def set_backend(name=None):
 possible = list(_BACKENDS)
 if (name is None):
  names = []
 else:
  names = name.split(',')
 for name in reversed(names):
  for backend in list(possible):
   if (backend.NAME == name):
    possible.remove(backend)
    possible.insert(0, backend)
    break
  else:
   raise LookupError(('Unkown backend: %r' % name))
 if ('null' not in names):
  possible = [b for b in possible if (b.NAME != 'null')]
 _ACTIVE_BACKENDS[:] = possible

def set_backend ( name = None ) : possible = list ( _BACKENDS ) if ( name is None ) : names = [ ] else : names = name . split ( ',' ) for name in reversed ( names ) : for backend in list ( possible ) : if ( backend . NAME == name ) : possible . remove ( backend ) possible . insert ( 0 , backend ) break else : raise LookupError ( ( 'Unkown backend: %r' % name ) ) if ( 'null' not in names ) : possible = [ b for b in possible if ( b . NAME != 'null' ) ] _ACTIVE_BACKENDS [ : ] = possible
set a prefered ffi backend .