9f9c68a
1
2
3
4
5
6
7
8
9
10
11
def clear_stdout(): ''' Attempts to clear stdout, whether running in a notebook (IPython) or locally in a Unix envirnoment. ''' try: from IPython.display import clear_output clear_output(wait=True) except ImportError: import os os.system("clear")