def iopub_handler(self, msg): # handle some of these messages: # stream, display_data, data_pub, execute_input, execute_result # error, status, clear_output logging.debug( "iopub received: %s" % msg)