Force Python to flush to stdout whenever we have an event to print

We want to see events as soon as they come in without waiting on the
output buffer to fill up. Is there a less heavy-handed way to do this?