from tkinter import * import os import subprocess class AppExE: def __init__(self, master): self.frame = Frame(master) self.b = Button(self.frame, text='Open', command=self.openFile) self.b.grid(row=1) self.frame.grid() def openFile(self): _filepath_ = ["C:\!TEST!" + chr(92) + "youtube-dl" + chr(46) + "exe ", "https://www.youtube.com/watch?v=TE3Bl2d-Mw0"] subprocess.run(_filepath_) root = Tk() app = AppExE(root) root.mainloop()