def nic_available(interface):
 try:
  subprocess.check_call([settings.ifconfig, interface], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  return True
 except subprocess.CalledProcessError:
  return False

def nic_available ( interface ) : try : subprocess . check_call ( [ settings . ifconfig , interface ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) return True except subprocess . CalledProcessError : return False
check if specified network interface is available .