def is_resource_enabled(resource):
 if (sys._getframe().f_back.f_globals.get('__name__') == '__main__'):
  return True
 result = ((use_resources is not None) and ((resource in use_resources) or ('*' in use_resources)))
 if (not result):
  _unavail[resource] = None
 return result

def is_resource_enabled ( resource ) : if ( sys . _getframe ( ) . f_back . f_globals . get ( '__name__' ) == '__main__' ) : return True result = ( ( use_resources is not None ) and ( ( resource in use_resources ) or ( '*' in use_resources ) ) ) if ( not result ) : _unavail [ resource ] = None return result
test whether a resource is enabled .