Skip to content

Instantly share code, notes, and snippets.

@tahsinkose
Created October 29, 2018 13:09
Show Gist options
  • Save tahsinkose/3bb63d44eefde757a54806679838373a to your computer and use it in GitHub Desktop.
Save tahsinkose/3bb63d44eefde757a54806679838373a to your computer and use it in GitHub Desktop.
Multiple line flashing with curses library
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