“cmd.window” controls the visibility of PyMOL's output window
cmd.window(string action, int x, int y, int width, int height)
def window(action='show', x=0, y=0, width=0, height=0):
window | api