I am looking to do a type of text animation using python. If you have used Metasploit, during the loading a wave of text appears Example: First fIrst fiRst FirSt firsT (all of it will be on the same line) I was thinking of something using sys.stdout.write("") but I cant replace the last symbol I place down with a lowercase after it was Capitalized.
# This version is fixed and works
import sys, time
lowerstr = "buffering"
upperstr = lowerstr.upper()
for x in range(len(lowerstr)):
s = '\r' + lowerstr[0:x] + upperstr[x] + lowerstr[x+1:] + '\r'
sys.stdout.write(s)
sys.stdout.flush()
time.sleep(0.1)