Jun-09-2020, 05:13 PM
Essentially yes.
I'm not sure if I can assign the get to a variable and then have a button event to execute the command.
example: variable = "SELECT DB.ID from DB WHERE DB.NAME = "comboboxvalue"
install_command = subprocess.Popen("cmd.exe /c setup.exe variable")
button event button1 = Button(root, text="Install", command=install_command)
I hope that helps to see where I'm wanting to go with it. I still have a lot to work out syntax and logic wise I just wanted to get some help getting started.
I'm not sure if I can assign the get to a variable and then have a button event to execute the command.
example: variable = "SELECT DB.ID from DB WHERE DB.NAME = "comboboxvalue"
install_command = subprocess.Popen("cmd.exe /c setup.exe variable")
button event button1 = Button(root, text="Install", command=install_command)
I hope that helps to see where I'm wanting to go with it. I still have a lot to work out syntax and logic wise I just wanted to get some help getting started.
from tkinter import * from tkinter.ttk import * import mysql.connector root = Tk() root.title('Software Installation') root.geometry("400x400") conn = mysql.connector.connect(host="x.x.x.x", user="UN", passwd="1234", database="myDb") c = conn.cursor() query = "Select DB.NAME from DB Where DB.ENABLED = True" c.execute(query) rows=c.fetchall() # Create Combobox combo = Combobox(root,values=rows) combo.pack() button1 = Button(root, text="Install") button1.pack() root.mainloop()