bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] Bug report: Unwanted output on stdout from rl_initialize(


From: Glen Coates
Subject: [Bug-readline] Bug report: Unwanted output on stdout from rl_initialize()
Date: Thu, 02 Aug 2007 11:45:26 +1000
User-agent: Thunderbird 2.0.0.5 (X11/20070719)

To whom it may concern,

I'm not sure if this is a bug in readline or an incorrect use of rl_initialize() in Python, however I started noticing that importing the readline library would cause unwanted control characters on stdout, i.e:

<test.py>

import readline
print "hello"

$ python test.py | od -tc
0000000 033   [   ?   1   0   3   4   h   H   e   l   l   o  \n

By recompiling python, I managed to trace the output to rl_initialize():

<test.c>

#include <stdio.h>
#include <readline/readline.h>
#include <readline/history.h>

int main()
{
        rl_initialize();
        printf( "hello\n" );
        return 0;
}

$ ./test | od -tc
0000000 033   [   ?   1   0   3   4   h   h   e   l   l   o  \n

I'm using the readline library shipped with Fedora 7 (readline-5.2-4.fc7
).  I have never seen this in previous versions of Fedora.

Could you please confirm whether or not this is a bug in readline, or rl_initialize() is being used incorrectly and thus a bug report should be made to the Python project?

Cheers,
Glen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]