Alex Rivera | Logout

Is there a way to clear Python's IDLE window?

Asked 2009-09-16T11:49:36.877
218

I know there's a similar topic about the Python console, but I do not know if they are the same. I tried system("clear") and it didn't work here.

How do I clear Python's IDLE window?

Edit
Report

1 Answer

2

The best way to do it on windows is using the command prompt 'cmd' and access the Python directory. The command prompt could be found on the start menu → Run → cmd.

C:
cd C:\Python27
python.exe

Output:

Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.

Session:

>>>import os
>>>os.system('cls')  #This will clear the screen and return the value 0
answered 2013-05-18T08:46:42.207

Your Answer