[issue12833] raw_input misbehaves when readline is imported

Idan Kamara report at bugs.python.org
Sat Aug 27 13:03:08 CEST 2011


Idan Kamara <idankk86 at 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 <report at bugs.python.org>
<http://bugs.python.org/issue12833>
_______________________________________


More information about the Python-bugs-list mailing list