Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Python :: remove None pandas 
Python :: select items from dataframe where value is null 
Python :: docker python 3.8 ubuntu 
Python :: pandas to list 
Python :: split string in the middle python 
Python :: get current month py 
Python :: how to do pandas profiling 
Python :: how to convert a am pm string to 24 hrs time python 
Python :: spark dataframe get unique values 
Python :: python capture in regex 
Python :: how to plot a graph using matplotlib 
Python :: draw circles matplotlib 
Python :: log scale seaborn 
Python :: counter in sort python 
Python :: using regex validators in django models 
Python :: django.db.backends.mysql install 
Python :: pytho list items to int 
Python :: polynomial fit in python 
Python :: godot code for movement for topdown game 
Python :: how to join a string by new line out of a list python 
Python :: python check if list contains elements of another list 
Python :: redirect to the same page django 
Python :: convert pascal annotation to yolo 
Python :: how to do key sensing in python 
Python :: how to know if python is 64 or 32 bit 
Python :: flask how to run app 
Python :: pass argument to a py file 
Python :: Renaming row value in pandas 
Python :: pca python 
Python :: age calculator in python 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =