1

How do I properly read user input using unicurses?

I am using wgetstr to read in user input, but how would I go about making sure that the input does not flow over to the next line. The input should just stop when the last character reaches the end of the window.

Currently:

import unicurses as uc

def read(window)
    st = uc.wgetstr(window)
    return st.decode('utf-8')

I'm not really willing to move over to curses or ncurses since I have an almost fully fuctional (minimal) library built around unicurses.

it2901
  • 69
  • 8
  • 1
    What exactly is the problem with the code you have? It doesn't even use `getstr()`? – mkrieger1 Mar 27 '20 at 14:13
  • Okay, so I used `wgetstr` and It worked, I can read input, but how do I make it so that the input does not flow over into the next line? – it2901 Mar 27 '20 at 17:04
  • If you have solved this issue, feel free to add the solution as an answer (you can also accept your own answer). If you have another problem, please create a new question. – mkrieger1 Mar 27 '20 at 17:08

0 Answers0