def add_log(list_logs, log):
'''next_ = list_logs[0].text()
list_logs[0].setText(log)
for q in range(len(list_logs)):
if q == 0: continue
print(q)
#list_logs[q].setText(next_)
try:
next_ = list_logs[q - 1].text()
print(next_)
except IndexError:
print(q)
break'''
back = log
for q in range(len(list_logs)):
try:
next = list_logs[q].text()
list_logs[q].setText(back)
back = list_logs[q+1]
list_logs[q+1].setText(next)
except:
break
return list_logs
def test_run_program(list_logs):
for q in range(25):
list_logs = add_log(list_logs, str(q))
time.sleep(1)