title: Highlighting and Selecting text with Python curses
body: <p>This is my first post to stack overflow. I've been lurking this site for information for years, and it's always helpful, so I thought that I would post my first question. </p>
  
  <p>I've been searching for some similar examples, but can't seem to find anything. </p>
  
  <p>Ultimately, I'm trying to write a simple text ui for finding false positives and false negatives in a text extraction program.  The false positive module is a simple yes/no selection, and displaying colored text and using getch() is easy enough.  The False negative portion however, is a becoming difficult. </p>
  
  <p>So this is what I want to do:</p>
  
  <ol>
  <li>Display a string onto the screen (forget scrolling for now.... ugh) It will only be a string with no newlines. </li>
  <li>The user sees the text, and pushes 'h' to enter highlight mode.  </li>
  <li>The user can then control the cursor to move it over a portion of the text (still displayed), and select 'v' to begin highlighting (I trying to make this as close to vi as I can)</li>
  <li>The user then uses control keys (arrows, hjkl) to move the cursor from a starting point to and end point, highlighting the text on the way.  This highlighted portion should be a word which is a false negative</li>
  <li>The user presses some key ('y' probably), and the selected text is colored, or stays highlighted, and the highlighted text is save to some variable that I'll handle later. </li>
  <li>The user exits highlight mode and proceeds. </li>
  </ol>
  
  <p>Any ideas to even START?  I'm trying simple things like keeping text on the screen and moving the cursor around, but to no avail. </p>
  
  <p>I'm aware of the curses.textpad.TextBox() module, but it performs editing like insertion and deletion, which I don't want to do.  Perhaps there is a way to disable it.  </p>
  
  <p>I have other questions, but I'll keep this specific for now.</p>
  
  <p>Thanks!! </p>
  
  <p>Neal </p>
  
  <p>Edit:  To be more specific, I'm not looking for help writing the whole program, just help moving the cursor over displayed text, highlighting it, and selecting it and saVing it in a variable. </p>