in loggen/message_generator.py [0:0]
def print_message_count_before_exit(sig, frame):
""" Interrupt handler to print the count of messages sent to pub/sub before
exiting python.
:param sig: the interrupt signal.
:param frame: the stackframe.
"""
print('\nSent {} messages.\nExiting'.format(message_count))
sys.exit(0)