Issue 13164: importing rlcompleter module writes a control sequence in stdout (original) (raw)
Issue13164
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−nliftestid|sed -n l if test id∥sed−nliftest{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) * ![]() |
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) * ![]() |
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 -> closedsuperseder: Importing readline produces erroneous outputnosy: + r.david.murraymessages: + resolution: duplicatestage: resolved |
2011-10-19 20:41:04 | eric.araujo | set | nosy: + eric.araujomessages: + versions: + Python 2.7, Python 3.2, Python 3.3, - Python 2.6 |
2011-10-13 12:35:20 | valva | create |