The program shows a license text, then the user has to accept the license (or not). Is there another way to get text from console? (that using sys.stdin.read) foo = sys.stdin.read(3) if foo != 'yes' sys.exit(0) I also would to trap the KeyboardInterrupt for that doesn't show that message. How would it be possible?