You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
importing rlcompleter module writes a control sequence in stdout #57373
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2015-04-14.21:32:54.782>created_at=<Date2011-10-13.12:35:20.371>labels= ['type-bug']
title='importing rlcompleter module writes a control sequence in stdout'updated_at=<Date2015-04-14.21:32:54.780>user='https://bugs.python.org/valva'
When you import the module rlcompleter in a python script in Centos 6 (x86_64), the control sequence \033[?1034h is printed in stdout. The problem is that these sequence is not visible by the user and cause a lot of confusion.
In my case I compared the output of a python script (the integer 6) in bash and I got:
test: 6: integer expression expected
How to reproduce:
=============================
BASH SCRIPT that calls test.py
=============================
id=$(./test.py)
echo $id|sed -n l
if test ${id} -eq 0;then
fi
Activity
valva commentedon Oct 13, 2011
When you import the module rlcompleter in a python script in Centos 6 (x86_64), the control sequence \033[?1034h is printed in stdout. The problem is that these sequence is not visible by the user and cause a lot of confusion.
In my case I compared the output of a python script (the integer 6) in bash and I got:
test: 6: integer expression expected
How to reproduce:
=============================
BASH SCRIPT that calls test.py
=============================
id=$(./test.py)
echo $id|sed -n l
if test ${id} -eq 0;then
fi
=========
test.py
=========
========
OUTPUT
========
[valva@wn009 ~]$ bash p.sh
\033[?1034h2$
p.sh: line 3: test: 2: integer expression expected
This only has happened to me in Centos 6 (python 2.6.5) I've tested in Centos 5, debian and Ubuntu and it does not happen.
merwok commentedon Oct 19, 2011
Can you give a simpler script (maybe in Python :) to reproduce this? Also, 2.6 only gets security fixes now, so please use 2.7, 3.2 or 3.3.
bitdancer commentedon Apr 14, 2015
Duplicate of 19884.