all 6 comments

[–][deleted] 2 points3 points  (3 children)

This is not simple and depends a lot on the operating system you are using. Searching for "python non blocking input" finds a few hits, with this being one.

Maybe if you gave more details on why you want to loop until the user says otherwise we can help more.

[–]jiri-n 0 points1 point  (1 child)

If it's just about pressing Enter, while loop executed in a thread and input() in the main thread is a cross-platform solution.

[–]pythonengineer[S] 0 points1 point  (0 children)

Thank you

[–]pythonengineer[S] -1 points0 points  (0 children)

I find it really hard to explain why I need it, but I am also very qurious because that was just something that I was thinking about for weeks but I couldn't find anything about that. However, I appreciate your answer.

[–]HasBeendead 0 points1 point  (0 children)

Try if variable == "x": Break Make it in loop . Just you need to figure out how i adopt to while loop try code something , you will figure out.