Python Forum

Full Version: Help adding a loop inside a loop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
What is it blocking on? Does BAXTER wait for a command? Perhaps when doing this:
command = UserInput() 
Yes, BAXTER waits for a command, so the UserInput() is blocking it.

I tried getting around it by trying multithreading, but it drastically slows down the main loop (BAXTER()) when running the scheduler in the background.

Is there any way to prevent UserInput() from blocking the scheduler?

UserInput()
#-------------------------------------------------------------------------------------
#                                User Input Function
#-------------------------------------------------------------------------------------
def UserInput():
    command = str(Prompt.ask("[yellow]"+Commander+"[/yellow]"))
    return command 
#-------------------------------------------------------------------------------------
Pages: 1 2 3 4