I\'m using raw_input in Python to interact with user in shell.
raw_input
c = raw_input(\'Press s or n to continue:\') if c.upper() == \'S\': print \'Y
Python does not provide a multiplatform solution out of the box. If you are on Windows you could try msvcrt with:
import msvcrt print 'Press s or n to continue:\n' input_char = msvcrt.getch() if input_char.upper() == 'S': print 'YES'