def _check_pyface_backend():
 try:
  from traits.trait_base import ETSConfig
 except ImportError:
  return (None, 2)
 backend = ETSConfig.toolkit
 if (backend == 'qt4'):
  status = 0
 else:
  status = 1
 return (backend, status)

def _check_pyface_backend ( ) : try : from traits . trait_base import ETSConfig except ImportError : return ( None , 2 ) backend = ETSConfig . toolkit if ( backend == 'qt4' ) : status = 0 else : status = 1 return ( backend , status )
check the currently selected pyface backend .