This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年10月13日 12:35 by valva, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg145452 - (view) | Author: Valvanuz (valva) | Date: 2011年10月13日 12:35 | |
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
=========
#!/usr/bin/python
import rlcompleter
a=2
print a
========
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.
|
|||
| msg145960 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年10月19日 20:41 | |
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. |
|||
| msg241034 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2015年04月14日 21:32 | |
Duplicate of 19884. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:22 | admin | set | github: 57373 |
| 2015年04月14日 21:32:54 | r.david.murray | set | status: open -> closed superseder: Importing readline produces erroneous output nosy: + r.david.murray messages: + msg241034 resolution: duplicate stage: resolved |
| 2011年10月19日 20:41:04 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg145960 versions: + Python 2.7, Python 3.2, Python 3.3, - Python 2.6 |
| 2011年10月13日 12:35:20 | valva | create | |