Hello everyone i have a function that manipulates that data and then writes output to an excel file. I would like to somehow print some text in the anaconda powershell promt followed by three blinking dots while the programm runs and then print another text like "Process completed!" when the programm finishes.
This is part of my code, somewhere inside which i need the blinking text to appear while programm is loading
def report():
file=int(input('Choose file :'))
if file==1:
print('')
print('Creating Report ......')
print('')
path2=desktop+'/test'
if len(os.listdir(path2))>0:
all_files2 = glob.glob(path2 + "/*.xlsx")
li2=[]
for i, filename in enumerate(all_files2):
dfp = pd.read_excel(filename,header=2)
dfp.drop(dfp.tail(1).index,inplace=True)
dfp.drop(dfp.columns[0],axis=1,inplace=True)
dfp.insert(loc=0,column='Date',value=dt)
dfp.insert(loc=1,column='Hrs',value=str(i+1) +'. '+ os.path.basename(filename).split('.')[0])
li2.append(dfp)
framep = pd.concat(li2, axis=0, ignore_index=True)
book=load_workbook(desktop+'/template.xlsx')
writer =pd.ExcelWriter(desktop+'Report-'+dt+'.xlsx', engine='openpyxl')
writer.book = book
writer.sheets = {ws.title: ws for ws in book.worksheets}
framep.to_excel(writer,sheet_name='Progressive',startrow=1,index = False,header= False)
writer.save()
while True:
Real_time_games()
if input("Do you want to create another report ? (Y/N) :").strip().upper() != 'Y':
break