Reading standard input

Fredrik Lundh fredrik at pythonware.com
Sat Oct 28 10:12:57 EDT 2006


MindClass wrote:

> 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)

http://effbot.org/pyref/raw_input.htm

> I also would to trap the KeyboardInterrupt for that doesn't show that
> message. How would it be possible?

any reason you cannot use an ordinary try-except for that?

</F>





More information about the Python-list mailing list