or you can use the decorator pyspin provide: from__future__importprint_functionimporttimefrompyspin.spinimportmake_spin,Default# Choose a spin style and the words when showing the spin.@make_spin(Default,"Downloading...")defdownload_video():time.sleep(10)if__name__=='__main__':print("...