Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyCharm Clear Screen
#1
How do you clear the screen using PyCharm?
Reply
#2
Pycharm has many screens, which one?
if talking about results screen, click on trash can icon on
bottom left.
Reply
#3
Sorry, I should have been more clear. I want to clear the screen where the program results are printed. And I want to clear the screen during a script. So far I am using a function:

def cls():
print ('\n' * 25)


But that seem clutzy?
Reply
#4
as I stated, the trash can icon on the left will do the trick
It's a serial terminal window, so you can't do what you are suggesting.
It has to be manually cleared.
Reply
#5
As Larz points out, you cannot clear the output screen except maunualy. Within your script you can use something like:

import os

# Use the next line every time you wish to 'clear' the screen. Works with Windows and Linux.
os.system('cls' if os.name == 'nt' else 'clear')
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  clear screen with pycharm boris602 0 2,176 Dec-12-2019, 12:28 PM
Last Post: boris602
  wn = turtle.screen() AttributeError: module 'turtle' has no attribute 'screen' Shadower 1 6,169 Feb-06-2019, 01:25 AM
Last Post: woooee
  How to clear the screen of glitched rectangles? user294869 1 4,132 Mar-03-2017, 09:36 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020