[pypy-issue] [issue1491] raw_input incorrectly places cursor when given escape sequences

sn6uv tracker at bugs.pypy.org
Wed May 22 10:03:40 CEST 2013


New submission from sn6uv <16sn6uv at gmail.com>:

Description:
raw_input seems to include the length of ANSI escape sequences in the prompt when positioning the cursor.
This does not seem to happen when running the command from a script, only when entered into the PyPy shell.
The entered text in put in the right place only the cursor's position is wrong, which is a bit confusing

Example:
>>> raw_input('\033[31m>>> \033[39m')

Screenshot (attached):
http://imgur.com/nqOhvfM

System Info:
$pypy --version
Python 2.7.3 (fcb6b056f00e33a72cba5e6769b253b839fe90bb, Nov 24 2012, 02:30:32)
[PyPy 2.0.0-beta1 with GCC 4.7.2]
$ uname -a
Linux angus-laptop 3.6.7-1-ARCH #1 SMP PREEMPT Sun Nov 18 10:11:22 CET 2012 x86_64 GNU/Linux
$ xterm -v
XTerm(287)
$ aterm --version
1.00.01

----------
files: pypy_escapeseq_cursor_bug.png
messages: 5747
nosy: pypy-issue, sn6uv
priority: bug
status: chatting
title: raw_input incorrectly places cursor when given escape sequences

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1491>
________________________________________


More information about the pypy-issue mailing list