This makes the displayhook invocation a sync point for streams, helping ensure that text printed prior to return values will arrive prior to the return output.
should fix #780
flush stdout/stderr on displayhook
This helps stream output arrive before pyout.
Great, thanks! I'd been meaning to do this for a while. Merging now.
Merged, I rebased to avoid the merge loop for just one commit. Closing here.