Created
October 29, 2018 13:09
-
-
Save tahsinkose/3bb63d44eefde757a54806679838373a to your computer and use it in GitHub Desktop.
Multiple line flashing with curses library
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
import time | |
import curses | |
if __name__=="__main__": | |
stdscr = curses.initscr() | |
curses.noecho() | |
curses.cbreak() | |
for i in range(100): | |
stdscr.addstr(0,0,'{0}/100 has finished'.format(i)) | |
stdscr.addstr(1,0,'{0}/100 has remained'.format(100-i)) | |
stdscr.refresh() | |
time.sleep(0.5) | |
curses.echo() | |
curses.nocbreak() | |
curses.endwin() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment