def send_to_ui(type, message):
	"""Send message to the auth ui"""
	global gtk_proc

	# Only execute of the process started
	if "gtk_proc" in globals():
		# Format message so the ui can parse it
		message = type + "=" + message + " \n"

		# Try to send the message to the auth ui, but it's okay if that fails
		try:
			gtk_proc.stdin.write(bytearray(message.encode("utf-8")))
			gtk_proc.stdin.flush()
		except IOError:
			pass
Send message to the auth ui
howdy/src/compare.py