cmds.scriptEditorInfo(clearHistory=True)
print("hi")
The top line clear's the Maya Script Output window, and then the line below that is supposed to print hi. But when you run this, it flashes the hi output, and then clears everything. So the cmds.scriptEditorInfo(clearHistory=True) is executing last. Could someone explain this to me and help me understand how I can clean the Output Window AND THEN print hi.
I got the clear function from here: How can I clear the Maya Script Editor programatically?