Answer the question
In order to leave comments, you need to log in
Why do I have to type Enter to keep the program running?
I am making a program to play music, but for some reason it asks to enter Enter in order to continue executing the code
def soundplay():
playsound(directory)
def processing_bar():
for i in tqdm(range(infomp32), ascii=True, desc=play):
sleep(1)
p1, p2 = Thread(target=processing_bar), Thread(target=soundplay)
p2.start()
p1.start()
#Вот здесь почему-то появляется пустая строка и до тех пор пока ты не нажмёшь Enter цикл не запуститься
while 1:
vopros = input("Хотите ли вы что-нибудь послушать? (д/н) ")
if vopros == "д":
xren()
elif vopros == "н":
break
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question