[New-bugs-announce] [issue13631] readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X

Zvezdan Petkovic report at bugs.python.org
Mon Dec 19 05:06:37 CET 2011

New submission from Zvezdan Petkovic <zvezdan at zope.com>:


The changes in r87356 for py3k and r87358 for python-2.7 described in issue 9907 have broken parsing of the initialization file .editrc under editline emulation of readline on Mac OS X.


Both readline and editline allow settings customized per program.
For example, .inputrc file for readline::

    $if Python
        set editing-mode vi

will be applied only to Python processes.

Similarly, .editrc file for editline::

    python:bind -v
    python:bind ^I rl_complete

will be applied only to Python processes on Mac OS X.

This works fine on python-2.6.

It's broken on 2.7 and 3.2 and later because the change in issue 9907 moved the rl_initialize() call towards the beginning of the setup function.


The rl_readline_name variable must be set to "python" **before** the call to rl_initialize().  Attached are patches for 2.7 and 3.2.

assignee: ronaldoussoren
components: Macintosh
files: readline-2.7.patch
keywords: patch
messages: 149813
nosy: ronaldoussoren, zvezdan
priority: normal
severity: normal
status: open
title: readline fails to parse some forms of .editrc under editline (libedit) emulation on Mac OS X
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file24043/readline-2.7.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list