def device_writer(queue):
 while True:
  (device, value) = queue.get()
  scaled = rescale_value(value[0])
  log.debug(('Write(%s) = %s' % (device, value)))
  if (not device):
   continue

def device_writer ( queue ) : while True : ( device , value ) = queue . get ( ) scaled = rescale_value ( value [ 0 ] ) log . debug ( ( 'Write(%s) = %s' % ( device , value ) ) ) if ( not device ) : continue
a worker process that processes new messages from a queue to write to device outputs .