Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python console animation

import time
# bar is the var that loops
bar = [
    " [=     ]",
    " [ =    ]",
    " [  =   ]",
    " [   =  ]",
    " [    = ]",
    " [     =]",
    " [    = ]",
    " [   =  ]",
    " [  =   ]",
    " [ =    ]",
]
i = 0

while thing_isnt_completed: # change loop if necessary
    print(bar[i % len(bar)], end="
")
    time.sleep(.2) # time per frame
    i += 1
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #console #animation
ADD COMMENT
Topic
Name
6+2 =