Ask Your Question

janusSage's profile - activity

2018-11-17 12:49:42 +0200 received badge  Popular Question (source)
2018-11-17 12:49:42 +0200 received badge  Notable Question (source)
2018-11-17 12:49:42 +0200 received badge  Famous Question (source)
2014-01-09 03:53:46 +0200 asked a question 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)