def send_messages(connection, topic, input):
 while True:
  try:
   body = pickle.load(input)
  except EOFError:
   break
  print ('%s: %s' % (body.get('timestamp'), body.get('event_type', 'unknown event')))
  connection.topic_send(topic, body)

def send_messages ( connection , topic , input ) : while True : try : body = pickle . load ( input ) except EOFError : break print ( '%s: %s' % ( body . get ( 'timestamp' ) , body . get ( 'event_type' , 'unknown event' ) ) ) connection . topic_send ( topic , body )
sends a a bunch of emailmessages .