#!/usr/bin/env python3 import json import struct import subprocess import sys def send_message(proc, message): """Send a message to the Native Host""" encoded = json.dumps(message).encode('utf-8') # Write message length (4 bytes, little-endian) proc.stdin.write(struct.pack('