Advertisement
GameNationRDF

File Launcher GUI Python Application Source Code

Oct 13th, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. from tkinter import *
  2. from tkinter.ttk import *
  3. from os import system
  4.  
  5. master = Tk()
  6.  
  7. def fileButtonCommand():
  8.     system("start " + userEntry.get())
  9.  
  10. def clearButtonCommand():
  11.     userEntry.delete(0, END)
  12.    
  13. quitButton = Button(master, text = "Quit", command = master.destroy)
  14. quitButton.pack(side = LEFT)
  15.  
  16. clearButton = Button(master, text = "Clear", command = clearButtonCommand)
  17. clearButton.pack(side = LEFT)
  18.  
  19. fileButton = Button(master, text = "Open", command = fileButtonCommand)
  20. fileButton.pack(side = LEFT)
  21.  
  22. userEntry = Entry(master)
  23. userEntry.pack(side = LEFT)
  24.  
  25. master.title("Files")
  26. master.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement