This is my problem: I'm trying to create a GUI with Tkinter that can read multiple files in folders and show their values on the interface. But when I press the widget button nothing happens.
This is the script that I use, feel free to ask your questions if you don't understand my process.
I will be very thankful if someone can help me.
for s in SOIList and valuesList:
if s == selectedConfig.get() and s == selectedConfig.get():
textfilespathB = 'C:/temp/dossiersoi2/'+s+'SOI.txt'
textfilespathC = 'C:/temp/fichiervalues2/'+s+'val.txt'
with open(textfilespathB, "r") as f:
frame2 = Frame(root, width = 50, height = 100)
frame2.grid(row = 2, column = 0)
Label(frame2, text=f.read()).pack()
with open(textfilespathC, "r") as f:
frame4 = Frame(root, width = 50, height = 100)
frame4.grid(row = 2, column = 1)
Label(frame4, text=f.read()).pack()
else:
print("not working")
This is the GUI related to my script.