Adapt Python 3 output.