Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

load text file line in listbox python tkinter site:stackoverflow.com

from tkinter import *

root = Tk()
Lb = Listbox(root)
Lb.grid()
f = open("test.txt","r")
for x in f:
    Lb.insert(END,x)
    print(x)
f.close()
root.mainloop()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #load #text #file #line #listbox #python #tkinter
ADD COMMENT
Topic
Name
3+1 =