Using curses, how can I echo and capture input at the current cursor position? I have moved the cursor using scr.move(y,x) and turned on echoing. I can type into it and have it displayed. How can I capture this data as a string after the user presses enter?
LinkMaster03
0
Newbie Poster
Recommended Answers
Jump to PostThere's a bunch of different ways:
curses.echo() # Enable echoing of characters # Get a 10-character string, with the cursor at pos x,y s = stdscr.getstr(x,y, 15)
curses.echo() c = stdscr.getch() # gets ascii integer value of character pressed on keyboard (use chr() function …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.