Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- from tkinter.ttk import *
- from os import system
- master = Tk()
- def fileButtonCommand():
- system("start " + userEntry.get())
- def clearButtonCommand():
- userEntry.delete(0, END)
- quitButton = Button(master, text = "Quit", command = master.destroy)
- quitButton.pack(side = LEFT)
- clearButton = Button(master, text = "Clear", command = clearButtonCommand)
- clearButton.pack(side = LEFT)
- fileButton = Button(master, text = "Open", command = fileButtonCommand)
- fileButton.pack(side = LEFT)
- userEntry = Entry(master)
- userEntry.pack(side = LEFT)
- master.title("Files")
- master.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement