Skip to content

Instantly share code, notes, and snippets.

@Pixailz
Created October 27, 2023 10:53
Show Gist options
  • Save Pixailz/d179ee721ce8493c87adde43acf72d7a to your computer and use it in GitHub Desktop.
Save Pixailz/d179ee721ce8493c87adde43acf72d7a to your computer and use it in GitHub Desktop.
testing of clearing a screen with ANSI Esc Seq
#!/usr/bin/env python3
import time
[ print(f"{i + 1} test") for i in range (0, 100) ]
def clear_screen():
print("\x1b[2J\x1b[H", end="")
print("should clear the screen in 3sec")
time.sleep(3)
clear_screen()
print("^^^NOTHING ABOVE^^^")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment