Start New Discussion within our Software Development Community

Most people would do something like this: input("Press any key to continue") #or raw_input This way, if the user presses a key other than the Enter (return) key, then the program will still continue.

It looks something like this:

import msvcrt

def any_key_message(message):
    for char in message:
        char = char.encode('utf8')

any_key_message("Press any key to continue...")
any_key_message("Press any key to exit...")
The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.