I'm working on a code editor based on nano. I've decided to make GUI for it, and the GUI language I chose is Python. I'm trying to make a button that opens batch files on Tkinter. I did so by importing import subprocess. Now, I created a button that opens the batch file with subprocess:
ttk.Button(frm, text="New Session", command=subprocess.run(['csession.bat']) ).grid(column=0, row=1)
Little problem is, when I launch the file, the subprocess action instantly gets executed instead of waiting for the user to click. I'm using VSCode and also debugging in VSCode (if that does any difference).