Flush python printout to correctly interleave with C++ printout
Needed with Python 3.8 (LCG_100)
@wouter FYI. This is the minimum necessary to fix the tests in lhcb-run2-patches, but the test coverage is far from complete... You might want to review and generalize, and presumably also port to ~master