I am writing a tkinter program that is kind of a program that is like a portfolio and opens up other programs also writen in python. So for example i have FILE_1 and FILE_2 and i want to write a program that onced clicked on a certain button opens either FILE_1 or FILE_2. i dont need help with the look like with buttons just how to wirte a function that opens a program
This is the code i used:
from Tkinter import *
import subprocess
master = Tk()
def z():
p=subprocess.Popen('test1.py')
p.communicate()
b = Button(master, text="OK", command=z)
b.pack()
mainloop()