Anyone know how to use termios (or similar) in python to get “intermittent” input. That is, it’s possible to be collecting a yield
generator or similar of input and pause the input half way through, and then restart it?
For example:
generator = inter_input('\n') # terminates on newline
# uses next(generator) to sequentially get next char
it’s important that it uses the built-in for keybinds because I still want the keybinds to be printed to the screen pressed by the user. I guess it’s possible for things like getkey
to be edited using termios to print the characters so I’d basically like anything where I can do the above, whether it be through single key getting with yield generator or just a single key getter function as long as it prints to screen and does keybinds (like if it deletes it should delete and what not) even better if it just returns current string so far (to get delete to work )