I am trying to create a scrollbar that keeps adding another line of text every second. I want it to work "live" and keep adding another line of text.
from tkinter import *
import time
master = Tk()
while True:
scrollbar = Scrollbar(master)
scrollbar.pack(side=RIGHT, fill=Y)
listbox = Listbox(master, yscrollcommand=scrollbar.set)
listbox.insert(END, "Another line\n")
listbox.pack(side=LEFT, fill=BOTH)
scrollbar.config(command=listbox.yview)
time.sleep(1)