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.

Author valva
Recipients valva
Date 2011-10-13.12:35:19
SpamBayes Score 7.56203e-09
Marked as misclassified No
Message-id <1318509320.97.0.686046301557.issue13164@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-10-13 12:35:21valvasetrecipients: + valva
2011-10-13 12:35:20valvasetmessageid: <1318509320.97.0.686046301557.issue13164@psf.upfronthosting.co.za>
2011-10-13 12:35:20valvalinkissue13164 messages
2011-10-13 12:35:19valvacreate