Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear PyCharm Run Window

Tags:

Is there a way to clear the "Run" console in PyCharm? I want a code that delete/hide all the print() made previously. Like the "clear_all" button, but without having to press it manually.

I have read that there is a way to do it in a terminal with os.system("cls"), but in PyCharm, it only adds a small square without clearing anything.

Also, I don't want to use print("\n" *100) since I don't want to be able to scroll back and see the previous prints.

like image 597
Simon Peloquin Avatar asked Dec 02 '14 03:12

Simon Peloquin


People also ask

How do you clear a Python run?

In an interactive shell/terminal, we can simply use ctrl+l to clear the screen.

How do I reset PyCharm console?

From the main menu, select File | Manage IDE Settings | Restore Default Settings. Alternatively, press Shift twice and type Restore default settings . Click Restore and Restart. The IDE will be restarted with the default configuration.


1 Answers

In Pycharm:

  1. CMD + , (or Pycharm preferences);
  2. Search: "clear all";
  3. Double click -> Add keyboard shortcut (set it to CTRL + L or anything)
  4. Enjoy this new hot key in your Pycharm console!
like image 53
You Shengwei Avatar answered Sep 23 '22 06:09

You Shengwei