Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Clear screen in Sage/Qtconsole

How do I clear the screen in Sage/Qtconsole?

The problem:

$ sage -ipython qtconsole

(... Qtconsole opens ...)


In [1]: clear
[...] UnboundLocalError: local variable 'f' referenced before assignment
In [2]: %clear
[...] UnboundLocalError: local variable 'f' referenced before assignment
In [3]: clear-screen
[...] UnboundLocalError: local variable 'f' referenced before assignment
In [4]: cls
[...] NameError: name 'cls' is not defined

Note that the first three commands clear the screen in regular Qtconsole (ipython qtconsole).


Is this a bug? Is there no way to clear the screen in Sage running inside Qtconsole?

(Sage Version: 5.12, IPython Version: 0.13.2)