mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 13:29:42 +02:00
30 lines
495 B
Python
Executable file
30 lines
495 B
Python
Executable file
#!/usr/bin/python3
|
|
|
|
import curses
|
|
import time
|
|
|
|
curses.initscr()
|
|
|
|
|
|
def initBar():
|
|
global progress_win
|
|
progress_win = curses.newwin(3, 62, 3, 10)
|
|
progress_win.border(0)
|
|
|
|
|
|
def updateBar(progress):
|
|
global progress_win
|
|
pos = (60 * progress) // 100
|
|
if pos != 0:
|
|
progress_win.addstr(1, 1, "#" * pos)
|
|
progress_win.refresh()
|
|
|
|
|
|
initBar()
|
|
loading = 0
|
|
while loading <= 100:
|
|
time.sleep(0.03)
|
|
updateBar(loading)
|
|
loading += 3
|
|
time.sleep(1)
|
|
curses.flushinp()
|