I'm creating a program using Python/Tkinter and it involves a main screen with a bunch of buttons. Each button will launch another Python script in the same folder.
I'm trying to create a function that will quit the script and open another. How can this be done?
People have recommended os.system on other similar threads, however everything I've tried has failed to work.
Any ideas/help would be greatly appreciated,
Jarrod
I'd consider using subprocess library in python.
import subprocess
p=subprocess.Popen(["python", "my_script_1.py"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
output=p.communicate()[0]
Hope this helps.
Function to Launch Another Python Script