Я создал GUI с помощью tkinter, я хочу, чтобы при открытии GUI запускался другой скрипт python. Это пример кода для того, что я сделал до сих пор.
window = Tk()
window.configure(bg='#101d25')
window.maxsize(width=580, height=450)
window.minsize(width=580, height=450)
title = Label(window, text='Face clustering', bg='#232d36', fg='#979ca0', font=('Ink Free', 30,
'bold'))
title.pack(side=TOP, fill=X)
process_label = Label(window, text='Processing files', fg='#979ca0', bg='#101d25', font=('Ink Free',
14, 'bold'))
process_label.place(x=70, y=150)
style = ttk.Style()
style.theme_use('clam')
TROUGH_COLOR = '#101d25'
BAR_COLOR = '#979ca0'
style.configure("red.Horizontal.TProgressbar", troughcolor=TROUGH_COLOR, bordercolor=TROUGH_COLOR,
background=BAR_COLOR, lightcolor=BAR_COLOR, darkcolor=BAR_COLOR)
progress_bar = ttk.Progressbar(window, style="red.Horizontal.TProgressbar", orient=HORIZONTAL,
length=300,mode="determinate")
progress_bar.place(x=50, y=200)
progress_bar.start()
os.system('python sample.py')
progress_bar.stop()
window.mainloop()
Я хочу, чтобы индикатор выполнения работал до тех пор, пока sample.py не завершит его выполнение. Файл выполняется, но GUI не отображается. Надеясь на решение.
Заранее спасибо