Correctly parsing and passing to animation engine messages from Python