From: Hongxu Jia <hongxu.jia@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 0/1] python: fix importing readline with probably escape sequence output
Date: Thu, 18 Jul 2013 18:54:59 +0800 [thread overview]
Message-ID: <cover.1374140808.git.hongxu.jia@windriver.com> (raw)
While imports readline in python, if TERM in terminfo is available and
it contains the variable 'km' and 'smm', the readline initialization will
output the value of 'smm' which is the escape sequence '\E[?1034h'.
'km' means the terminal has a meta key which is a special key on MIT keyboards,
'smm' means turn on the meta key if this terminal has one.
There are 4 solutions to fix this issue:
1) Preserving TERM and unsetting TERM, or setting TERM with a terminal
without 'smm' (such as terminal 'dumb'). This is the most common
approach. But the effect is global even we don't import readline.
https://bugzilla.redhat.com/show_bug.cgi?id=304181
http://bugs.python.org/issue11390
http://lists.gnu.org/archive/html/bug-readline/2013-06/msg00000.html
2) Modify readline.c in python, mandatory let readline use a term
without 'smm' as terminal (such as 'dumb'), it is similar to the
above solution, but it localizes the effect in readline. The reason
why choose 'dumb' is GNU Readline library use 'dumb' as default term
when TERM is unset.
3) Modify terminfo.src in ncurses, let terminfo database doesn't
contian 'smm', but the number of terms we supported is limited.
4) Modify terminal.c and readline.c in GNU Readline library to explicitly
disable meta key, or just comment out the outputting code.
This patch implements solution 2, I think it has the least side effect.
Thanks
Hongxu
The following changes since commit 3dee534f1e25109e0bdb681de0746c336f4b8840:
lib/oeqa: fix dependecy check (2013-07-16 10:04:17 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/fix-python-readlne
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-python-readlne
Hongxu Jia (1):
python: fix importing readline with probably escape sequence output
meta/recipes-devtools/python/python.inc | 4 ++-
...e-explicitly-use-dumb-as-default-terminal.patch | 35 ++++++++++++++++++++++
2 files changed, 38 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/python/python/readline-explicitly-use-dumb-as-default-terminal.patch
--
1.8.1.2
next reply other threads:[~2013-07-18 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-18 10:54 Hongxu Jia [this message]
2013-07-18 10:55 ` [PATCH 1/1] python: fix importing readline with probably escape sequence output Hongxu Jia
2013-07-18 16:36 ` Saul Wold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1374140808.git.hongxu.jia@windriver.com \
--to=hongxu.jia@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox