Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python terminal progress bar

from os import system
from time import sleep

def loading_bar(f, ut, s=0) -> None:
    for i in range(f, ut):
        print('[', sep='', end='')
        print(f"33[37m{'':#^{i}}33[0m", end='')
        print(' '*(99-i), ']', sep='')
        sleep(s)
        system('cls')

# From %, Up to %, Speed
loading_bar(0, 50, 0.1)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #terminal #progress #bar
ADD COMMENT
Topic
Name
1+3 =