def clear():
  print("\x1B[2J")

clear()
2
Contributors
3
Replies
7
Views
7 Years
Discussion Span
Last Post by Gribouillis
0

Correction: you were right, I couldn't make it work on windows. The ANSI.SYS driver works only with very old versions of windows. You would need a terminal emulator similar to the linux console. There is a module console for windows, with slightly different control sequences. See if it works with your versions of windows/python.

So let's say it's linux only...

Edited by Gribouillis: n/a

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.