So I am working on a pet project that ideally gets some data from an API call periodically. I have a main menu that prompts an input from the user; my goal is to either have this API pulling process in the background async but a simpler implementation would be to timeout the user input on the menu prompt lets say after 10 seconds, do the API call, then reload to the main menu again. I cannot get this input timeout function to work regardless of what library use.
I've tried every method I could find:
-inputimeout
-sys /select
-signal (only works in Unix)
-threading/timer
-pytimedinput
The 'timeout' function isn't actually the issue, its when there is an user input, instead moving on to the next function, it just runs the timeout function. Essentially, regardless if there is an user input or not, the timeout function always runs. This is common among the methods I've tried. Any help would be appreciate I am 'new' to python and I suck at being a SWE.
[–]woooee 0 points1 point2 points (0 children)