Apr-27-2019, 07:11 AM
So, i did as you suggested.
#################################################################################################### thread_pool_executor = futures.ThreadPoolExecutor(max_workers=1) #################################################################################################### def on_question1(): pygame.init() pygame.mixer.init() pygame.mixer.music.load("google_pt.mp3") pygame.mixer.music.play(0) time.sleep(3) pygame.mixer.music.load("google_en.mp3") pygame.mixer.music.play(0) time.sleep(0) for x in range(1, 101): window.after(0, progress_var.set, x) time.sleep(0.05) window.after(0, progress_var.set, 0) webbrowser.open("www.google.com") window.after(0, bot.set, '') #################################################################################################### def main(): question = Utilizador.get()# - google website if question in user_1: bot.set(choice(bot_info2)) Utilizador.set('') thread_pool_executor.submit(on_question1) ####################################################################################################The progressbar works, and the website opens, but no sound is reproduced.