Last active
February 15, 2024 20:09
-
-
Save se7enack/d59329326dd3070fc3a521a0d03815dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import time | |
import curses | |
import os | |
message = "Warning - Production" | |
loading = True | |
def rotate(msg): | |
msg = f" {msg} " | |
stdscr = curses.initscr() | |
ani = ('\\', '|' ,'/', '-') | |
for i in ani: | |
size = os.get_terminal_size() | |
w = size[0] | |
stdscr.addstr(0, 0, "".center(w, i)) | |
stdscr.addstr(1, 0, msg.center(w, i)) | |
stdscr.addstr(2, 0, "".center(w, i)) | |
stdscr.refresh() | |
time.sleep(.25) | |
while loading == True: | |
rotate(message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment