def startpings(host, targetips):
 targetips = ' '.join(targetips)
 cmd = ((('while true; do  for ip in %s; do ' % targetips) + ('  echo -n %s "->" $ip ' % host.IP())) + '   `ping -c1 -w 1 $ip | grep packets` ;  sleep 1; done; done &')
 info(('*** Host %s (%s) will be pinging ips: %s\n' % (host.name, host.IP(), targetips)))
 host.cmd(cmd)

def startpings ( host , targetips ) : targetips = ' ' . join ( targetips ) cmd = ( ( ( 'while true; do  for ip in %s; do ' % targetips ) + ( '  echo -n %s "->" $ip ' % host . IP ( ) ) ) + '   `ping -c1 -w 1 $ip | grep packets` ;  sleep 1; done; done &' ) info ( ( '*** Host %s (%s) will be pinging ips: %s\n' % ( host . name , host . IP ( ) , targetips ) ) ) host . cmd ( cmd )
tell host to repeatedly ping targets .