[issue12833] raw_input misbehaves when readline is imported

2015-07-30 Thread Berker Peksag

Berker Peksag added the comment:

Also, I'd change the patch to use a note directive.

--
nosy: +berker.peksag
stage: commit review - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12833
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12833] raw_input misbehaves when readline is imported

2015-06-11 Thread Martin Panter

Martin Panter added the comment:

Actually, there should either be a space before the double-colons, or the full 
stops should be removed. So either of these options:

. . . when a backspace is typed. ::
. . . when a backspace is typed::

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12833
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12833] raw_input misbehaves when readline is imported

2014-06-07 Thread Dhanam Prakash

Dhanam Prakash added the comment:

Hi,
submitting a patch for the documentation.
Thanks

--
hgrepos: +254
keywords: +patch
nosy: +dhanamp
Added file: http://bugs.python.org/file35519/issue12833.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12833
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12833] raw_input misbehaves when readline is imported

2011-08-29 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 Still, this behavior is surprising and undesirable. I would suggest
 adding a note to the docs for the readline module
+1.

--
assignee:  - docs@python
components: +Documentation -IO, Interpreter Core
nosy: +docs@python
stage: test needed - needs patch
versions: +Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12833
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12833] raw_input misbehaves when readline is imported

2011-08-27 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

Reproduced on 3.3 head. Looking at the documentation of the C readline
library, it needs to know the length of the prompt in order to display
properly, so this seems to be an acknowledged limitation of the underlying
library rather than a bug on our side.

Still, this behavior is surprising and undesirable. I would suggest adding
a note to the docs for the readline module, directing users to write:

input(foo )

instead of:

sys.stdout.write(foo )
input()

--
nosy: +nadeem.vawda

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12833
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12833] raw_input misbehaves when readline is imported

2011-08-27 Thread Idan Kamara

Idan Kamara idank...@gmail.com added the comment:

You're right, as this little C program verifies:

#include stdio.h
#include stdlib.h
#include readline/readline.h

int main() {
   printf(foo );
   char* buf = readline();
   free(buf);

   return 0;
}

Passing ' ' seems to be a suitable workaround for those who can't pass the text 
directly to raw_input though (such is the case where you have special classes 
who handle output).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12833
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12833] raw_input misbehaves when readline is imported

2011-08-26 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Maybe you need to call sys.stdin.flush() before raw_input?

In any way, 2.6 is in security mode, so we need to reproduce this with current 
versions: 2.7, 3.2 or 3.3.

--
components: +IO, Interpreter Core -Library (Lib)
nosy: +eric.araujo, pitrou
stage:  - test needed
versions:  -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12833
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12833] raw_input misbehaves when readline is imported

2011-08-26 Thread Idan Kamara

Idan Kamara idank...@gmail.com added the comment:

Reproduced on 2.7.

(flushing stdin/out doesn't help)

--
versions: +Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12833
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12833] raw_input misbehaves when readline is imported

2011-08-25 Thread Mads Kiilerich

Changes by Mads Kiilerich m...@kiilerich.com:


--
nosy: +kiilerix

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12833
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12833] raw_input misbehaves when readline is imported

2011-08-24 Thread Idan Kamara

New submission from Idan Kamara idank...@gmail.com:

import sys, readline

sys.stdout.write('foo ')
raw_input()

When trying the above on Debian, 2.6.6 using gnome-terminal, typing a character 
then hitting backspace deletes foo  as well.

I'm not sure if this is a bug or the expected behavior when writing to stdout 
directly rather than passing the string to raw_input() (for my particular use 
case that's not an option though).

One possible workaround seems to be to delete the trailing space from write() 
and move it to raw_input:

sys.stdout.write('foo')
raw_input(' ')

Then backspace seems to work properly. This has something to do with readline 
because when it's not imported, it also works as expected (but other things 
break obviously).

--
components: Library (Lib)
messages: 142887
nosy: idank
priority: normal
severity: normal
status: open
title: raw_input misbehaves when readline is imported
type: behavior
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12833
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com