Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
qtconsole Out value prints before the print statements that precede it #780
added a commit
Sep 12, 2011
I see the same thing. I swear we keep fixing this, and it keeps coming back.
It's not necessarily incorrect that the 123 is coming before the printed message, because when print text actually gets drawn is controlled by sys.stdout.flush, so unless you are calling flush yourself, such things are not technically reliable (though they tend to be consistent within a given environment). What is definitely incorrect is that stdout content should never show up on the same line as pyout.
If we add sys.stdout.flush() to the zmq.displayhook prior to send, then it will behave as you are expecting, so we should probably do that (see PR #782).