Im making a window in tkinter and I can't figure out how to run an external program in python. I am using the full path and am getting no errors, the file is just not loading.
I've tried os.startfile(path)
but that doesn't open the file.
Here is my code:
from tkinter import *
from tkinter import ttk
import os
def run_selected():
if ver.get() == "Test":
os.startfile(path)
master = Tk()
ver = ttk.Combobox(master, state="readonly", values=["Test"])
ver.pack()
Button(master, text="Run", command=run_selected).pack()
master.mainloop()
How do I fix this so that I can open the file?
EDIT: My (path)
is "C:\Backup\Mindustry\Mindustry.exe"