def prompt(pagenum):
    """
    Show default prompt to continue and process keypress.

    It assumes terminal/console understands carriage return \r character.
    """
    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')
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' )
Show default prompt to continue and process keypress.

    It assumes terminal/console understands carriage return \r character.