Hello help me iam new in the world of tkinter and programming
I want in same window two button one start and one stop . If you push start call any python script and run in background file
And the stop if push button stoppind the threading running script from start button .. sorry forvmy English
I want in same window two button one start and one stop . If you push start call any python script and run in background file
And the stop if push button stoppind the threading running script from start button .. sorry forvmy English
from tkinter import * import os from threading import * def Start() t1=Thread(target=Run) t1.start() def Run(): os.system("python3 masterscript.py") # or something else py script def stop(): # i want to stop masterscript run def Run() root = Tk() root.title("test") root.geometry("500x500") app = Frame(root) app.grid() startBut = Button(app, text="Start", command=Start) stopBut = Button(app, text="stop", command=stop) startBut.grid() stopBut.grid() root.mainloop()