524
526
class ClearMixin(object):
525
527
"""Use this mixin to make Demo classes with less visual clutter.
527
529
Demos using this mixin will clear the screen before every block and use
530
532
Note that in order for the methods defined here to actually override those
531
533
of the classes it's mixed with, it must go /first/ in the inheritance
534
536
class ClearIPDemo(ClearMixin,IPythonDemo): pass
536
538
will provide an IPythonDemo class with the mixin's features.
539
541
def marquee(self,txt='',width=78,mark='*'):
540
542
"""Blank marquee that returns '' no matter what the input."""
544
546
"""Method called before executing each block.
546
548
This one simply clears the screen."""
547
549
from IPython.utils.terminal import term_clear