Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from tkinter import *
- MyGUIinterface = Tk()
- qp = StringVar()
- po = (qp)
- vsd = os.listdir(po)
- MyGUIinterface.title("LSTIR Pratotype")
- MyGUIinterface.geometry('600x500')
- txt = Entry(MyGUIinterface, textvariable = qp ,width=50)
- txt.grid(column=2, row=0)
- def clicked():
- folderpath = Label(MyGUIinterface, text = vsd)
- btn = Button(MyGUIinterface, text="enter the folder path and click me",
- commnd = clicked )
- btn.grid(column = 0, row=0)
- MyGUIinterface.mainloop()
- import os
- from tkinter import *
- MyGUIinterface = Tk()
- qp = StringVar()
- MyGUIinterface.title("LSTIR Pratotype")
- MyGUIinterface.geometry('600x500')
- txt = Entry(MyGUIinterface, textvariable = qp ,width=50)
- txt.grid(column=1, row=0)
- def clicked():
- vsd = os.listdir(qp.get())
- folderpath = Label(MyGUIinterface, text = vsd)
- folderpath.grid(columnspan=2)
- btn = Button(MyGUIinterface, text="enter the folder path and clickme",command = clicked )
- btn.grid(column = 0, row=0)
- MyGUIinterface.mainloop()
Add Comment
Please, Sign In to add comment