[Issue 10467] readln problem with CTRL-Z
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 24 15:20:19 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10467
--- Comment #2 from bearophile_hugs at eml.cc 2013-06-24 15:20:18 PDT ---
(In reply to comment #1)
> Just for the record, what *would* the correct behavior be?
An equivalent Python2.6 program:
while True:
guess = raw_input("Input: ").strip()
if guess == "1":
break
This is how Python behaves here (inputs are 1, CTRL-C and CTRL-Z):
>temp.py
Input: 1
>temp.py
Input: Traceback (most recent call last):
File "\temp.py", line 2, in <module>
guess = raw_input("Input: ").strip()
KeyboardInterrupt
>temp.py
Input: ^Z
Traceback (most recent call last):
File "\temp.py", line 2, in <module>
guess = raw_input("Input: ").strip()
EOFError
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list