def isTipcAvailable():
 if (not hasattr(socket, 'AF_TIPC')):
  return False
 if (not os.path.isfile('/proc/modules')):
  return False
 with open('/proc/modules') as f:
  for line in f:
   if line.startswith('tipc '):
    return True
 if test_support.verbose:
  print "TIPC module is not loaded, please 'sudo modprobe tipc'"
 return False

def isTipcAvailable ( ) : if ( not hasattr ( socket , 'AF_TIPC' ) ) : return False if ( not os . path . isfile ( '/proc/modules' ) ) : return False with open ( '/proc/modules' ) as f : for line in f : if line . startswith ( 'tipc ' ) : return True if test_support . verbose : print "TIPC module is not loaded, please 'sudo modprobe tipc'" return False
check if the tipc module is loaded the tipc module is not loaded automatically on ubuntu and probably other linux distros .