Skip to content

Clearing the input/output window using code? #1074

Closed Answered by dlech
rajrao asked this question in Q&A
Discussion options

You must be logged in to vote

Try print("\x1b[H\x1b[2J", end=""). These are terminal escape codes to clear the terminal.

https://unix.stackexchange.com/questions/124762/how-does-clear-command-work

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@rajrao
Comment options

@dlech
Comment options

@rajrao
Comment options

@dlech
Comment options

Answer selected by rajrao
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants