Recently I have encountered the issue in Rhino Python Editor. So the issue is that my print command will not print content in the console screen (output tab), After some testing, it seems that it only happens to print commands after obj.ExpireSolution(True). gh.CloseAllDocuments() and gh.OpenDocument() may also affect the print function as well.
Another issue is that there are no varaibles stored in the Variables tab.
I do not know about the exact setup of that function, but I think that @stevebaer might know more precisely. Generally the print function fills the window via a callback, and that callback has to be set to a GH-specific value by GhPython. I think that was scope-specific but… I need to investigate this with Steve or possibly @Alain to tell more.