Code to clear console and variables in Spyder

前端 未结 2 1024
轻奢々
轻奢々 2020-12-07 05:56

Tried many suggestions to clear console and variables in Spyder using code not CTRL+L but they do not work.

wondering any effective suggestion what

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-07 06:57

    The simplest way that I have come across to clear the Spyder console programmatically is:

    print("\033[H\033[J") 
    

    From Link and suggested by Denis Rasulev .

    print("\014")
    

    Also works.

提交回复
热议问题