Python error messages are split weirdly into multiple lines.

It's supposed to look like the Python interpreter's output for errors:

Runtime might be splitting some log text into multiple log packets. Since we give each log packet its own line, this makes the message span multiple lines. How can we know when a log line should actually end?