C to Python Serial Multiplexing library