How to clear Python’s Idle screen?

Asked

Viewed 1,462 times

-1

How to clear the Python Idle screen?

After several entries it becomes polluted and bad to visualize. This is possible in a practical way?

2 answers

1

There is no native IDLE command, but it is possible to do this with external libraries.

You can do using the os, for example:

import os
os.system('clear') # se estiver utilizando linux
os.system('cls') # se estiver utilizando o windows

0

Utilize

import os
os.system('clear') or None

Browser other questions tagged

You are not signed in. Login or sign up in order to post.