[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: > The patch still does not handle the case where the eof indicator > is already set when calling raw_input. My original patch does. I commited your original patch but I kept mine because it doesn't hurt to clear the error on EOF at exit. Reopen the issue if it

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset b40dac6390a9 by Victor Stinner in branch '2.7': Issue #1195: fix the issue number of the NEWS entry http://hg.python.org/cpython/rev/b40dac6390a9 New changeset d780ca579e6f by Victor Stinner in branch '3.2': Issue #1195: fix the issue number of the

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-30 Thread STINNER Victor
STINNER Victor added the comment: Ooops, I specified the wrong issue number in my commits :-/ New changeset 3b1b06570cf9 by Victor Stinner in branch '2.7': Issue #12016: my_fgets() now always clears errors before calling fgets(). Fix http://hg.python.org/cpython/rev/3b1b06570cf9 New changeset

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-30 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-10 Thread Ralf Schmitt
Ralf Schmitt added the comment: Either you clearerr or you can't rely on feof. fgets might also set the end of file indicator *and* return valid data. I don't see a reason to not call clearerr right before trying to read from the stream. -- ___ Pyt

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: > The patch still does not handle the case where the eof indicator > is already set when calling raw_input. My original patch does. Correct, your example fails, but only in Python 2.7. I don't like the idea of always clearing errors. I prefer to reset stdin on

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-09 Thread Ralf Schmitt
Ralf Schmitt added the comment: The patch still does not handle the case where the eof indicator is already set when calling raw_input. My original patch does. Run the following program and hit ctrl-d, then ctrl-c: import sys sys.stdin.read() while True: try: s = raw_input('> ')

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-09 Thread STINNER Victor
STINNER Victor added the comment: It should be fixed. Reopen the issue if it doesn't work, I only tested on Linux. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset c9f07c69b138 by Victor Stinner in branch '2.7': (Merge 3.1) Issue #1195: Fix input() if it is interrupted by CTRL+d and then http://hg.python.org/cpython/rev/c9f07c69b138 -- ___ Python tracker

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-05-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa3227c3cf87 by Victor Stinner in branch '3.1': Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, http://hg.python.org/cpython/rev/fa3227c3cf87 New changeset b5914bfb4d04 by Victor Stinner in branch '3.2': Issue #1195: Fix in

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-03-18 Thread STINNER Victor
STINNER Victor added the comment: Instead of always calling clearerr(), we can only call it on EOF: diff -r 88fe1ac48460 Parser/myreadline.c --- a/Parser/myreadline.c Mon Mar 07 08:31:52 2011 +0100 +++ b/Parser/myreadline.c Fri Mar 18 10:57:23 2011 +0100 @@ -72,6 +72,7 @@ } #e

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-03-17 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +haypo -BreamoreBoy versions: +Python 3.1, Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-b

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-03-17 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: up! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2010-12-17 Thread Finkregh
Changes by Finkregh : -- nosy: +Finkregh ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2010-11-09 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Confirming that issue is present in latest svn checkout and Ralf's fix helps. -- nosy: +nvetoshkin ___ Python tracker ___

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2010-11-08 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2010-11-07 Thread Jeong-Min Lee
Changes by Jeong-Min Lee : -- nosy: +falsetru ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2010-09-18 Thread Mark Lawrence
Mark Lawrence added the comment: There's a one line patch in msg59242, could someone please take a look. Apparantly py3k is not affected by this issue although I haven't tried it myself. -- nosy: +BreamoreBoy stage: unit test needed -> patch review versions: +Python 2.7 -Python 2.6

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2009-05-12 Thread Daniel Diniz
Daniel Diniz added the comment: Confirmed in trunk, doesn't seem to affect py3k. -- keywords: +patch nosy: +ajaksu2 stage: -> test needed versions: +Python 2.6 -Python 2.5 ___ Python tracker __

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2008-01-04 Thread Ralf Schmitt
Ralf Schmitt added the comment: The following patch fixes it. The end-of-file indicator is still set, fgets returns NULL when ctrl-c is pressed, and the code checks for feof(fp) which is true. PyErr_CheckSignals() isn't called. This patch calls clearerr on the filepointer and consequently after c

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2007-09-24 Thread Sean Reifschneider
Changes by Sean Reifschneider: -- components: +Library (Lib) -None priority: -> normal type: -> behavior __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2007-09-24 Thread Georg Brandl
Georg Brandl added the comment: There are a few other issues about raw_input and signals in the tracker, possibly this is just another incarnation... The docs tracker link is fixed, but needs a rebuild on the server. -- nosy: +georg.brandl __ Tracker <[E

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2007-09-24 Thread Rebecca Breu
New submission from Rebecca Breu: Run the program: while True: try: s = raw_input('> ') except: pass Press Ctrl-D and then Ctrl-C, and you get Traceback (most recent call last): File "test.py", line 5, in ? s = raw_input('> ') KeyboardInterrupt Pressing just Ctr