Mailinglist Archive: opensuse-bugs (4968 mails)

< Previous Next >
[Bug 503121] New: python readline woes
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Tue, 12 May 2009 10:24:29 -0600 (MDT)
  • Message-id: <bug-503121-21960@xxxxxxxxxxxxxxxxxxxxxxxx/>

Summary: python readline woes
Classification: openSUSE
Product: openSUSE 11.1
Version: Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Other
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: koenig@xxxxxxxx
QAContact: qa@xxxxxxx
Found By: ---

to my surprise, "import readline" produces some output on stdout, even if
stdout is not a terminal (e.g. a pipe, or written to file).


atuin > TERM=xterm python -c "import readline" | hexdump -C
00000000 1b 5b 3f 31 30 33 34 68 |.[?1034h|

this is related to TERM=xterm (does not happen for vt100/linux/).

this esc sequence comes from the following terminfo value

atuin readline-5.1 > infocmp -1 | grep smm

which is available since SUSE 10.3.

python in 10.2 and older does not output anything, python in 10.3 and newer
does output.

now I'm using something like

if sys.stdout.isatty():
import readline

in but IMHO that's a bug in python (or even readline ?).
if output does not go to a terminal, there should be not esc sequences in

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >