Guest User

Untitled

a guest
Oct 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. import os
  2. from tkinter import *
  3.  
  4. MyGUIinterface = Tk()
  5. qp = StringVar()
  6. po = (qp)
  7. vsd = os.listdir(po)
  8.  
  9. MyGUIinterface.title("LSTIR Pratotype")
  10.  
  11. MyGUIinterface.geometry('600x500')
  12.  
  13. txt = Entry(MyGUIinterface, textvariable = qp ,width=50)
  14. txt.grid(column=2, row=0)
  15.  
  16.  
  17. def clicked():
  18. folderpath = Label(MyGUIinterface, text = vsd)
  19.  
  20.  
  21.  
  22.  
  23.  
  24. btn = Button(MyGUIinterface, text="enter the folder path and click me",
  25. commnd = clicked )
  26.  
  27. btn.grid(column = 0, row=0)
  28.  
  29. MyGUIinterface.mainloop()
  30.  
  31. import os
  32. from tkinter import *
  33.  
  34. MyGUIinterface = Tk()
  35. qp = StringVar()
  36.  
  37. MyGUIinterface.title("LSTIR Pratotype")
  38.  
  39. MyGUIinterface.geometry('600x500')
  40.  
  41. txt = Entry(MyGUIinterface, textvariable = qp ,width=50)
  42. txt.grid(column=1, row=0)
  43.  
  44.  
  45. def clicked():
  46. vsd = os.listdir(qp.get())
  47. folderpath = Label(MyGUIinterface, text = vsd)
  48. folderpath.grid(columnspan=2)
  49.  
  50.  
  51. btn = Button(MyGUIinterface, text="enter the folder path and clickme",command = clicked )
  52.  
  53. btn.grid(column = 0, row=0)
  54.  
  55. MyGUIinterface.mainloop()
Add Comment
Please, Sign In to add comment