Clearing IDLE's shell for Python

So I'm doing an MIT OCW assignment where I am creating a functional game of hangman. I got everything working. In IDLE, I have to hit F5 to run the code in the shell. I don't know any other way to run it, but that's not the big deal to me.

The main problem: the shell gets absolutely full of responses. It just keeps stacking up with more and more output. So, my question. Is it possible to put in a piece of code to clear the shell? Or do I just have to deal with it for now?

EDIT: To clarify: I need the prints for each cycle. Every time the user guesses a letter, it prints something like this:

2 guesses remaining

Possible answers: abdfghijkpquvwxyz

Guess a letter:g

That letter is not in the word!

_ o_ _ _ tr_

I just want to know if there is a way I can clear what is in the shell before the next 'cycle' is printed.


You can close it and just open a new one when you want to run the program or run it from the terminal and use use clear after you exit the shell

Need Your Help

Change NSTableView alternate row colors

objective-c cocoa macos interface-builder nstableview

I'm using the "Alternating Rows" option in Interface Builder to get alternating row colors on an NSTableView. Is there any way to change the colors of the alternating rows?

LR merc_timer_handle_t

c sockets automated-tests

I want to use "merc_timer_handle_t" to record time in loadrunner, but when I create a scenario, LR gives an error message:"Syntax error on line 15 near "MasterT"".