code: def prompt(pagenum):
      
      prompt = "Page -%s-. Press any key to continue . . . " % pagenum
      echo(prompt)
      if getch() in [ESC_, CTRL_C_, 'q', 'Q']:
          return False
      echo('\r' + ' '*(len(prompt)-1) + '\r')
docs: Show default prompt to continue and process keypress.
  
      It assumes terminal/console understands carriage return \r character.