[issue1667] license() does not process keyboard input correctly

Joseph Armbruster report at bugs.python.org
Thu Dec 20 19:28:08 CET 2007


Joseph Armbruster added the comment:

Ok, just did as so:

sys.stdout.write(prompt)
sys.stdout.flush()
key = sys.stdin.readline()
print(repr(key))
print(len(key))
if key not in ('', 'q'):

Results:

All Python releases are Open Source (see http://www.opensource.org for
Hit Return for more, or q (and Return) to quit:
'\n'
1
Hit Return for more, or q (and Return) to quit: q
'q\n'
2

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1667>
__________________________________


More information about the Python-bugs-list mailing list