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.

classification
Title: .inputrc magic-space breaks interactive mode
Type: behavior Stage:
Components: None Versions: Python 3.1, Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, stephenk
Priority: normal Keywords:

Created on 2010-09-03 02:11 by stephenk, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg115412 - (view) Author: (stephenk) Date: 2010-09-03 02:17
Adding the following line to ~/.inputrc for bash commandline usage will break the python interactive interpreter.  Specifically, you can no longer type "space" characters:

Space: magic-space

This is fairly serious for bash users, because once you've lived with magic-space you don't ever want to live without it.

This was tested under 2 different operating systems (Ubuntu 9.10, FreeBSD 6.0) and 3 different python versions, so the problem seems widespread.
msg115670 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-09-05 19:48
I didn't know what "magic space" is. But a quick google search shows that it is specific to Bash.

in http://www.ukuug.org/events/linux2003/papers/bash_tips/#S16
"""
There are other readline-based programs without this feature, so make it only apply in Bash:

$if Bash
  Space: magic-space
$endif

For example the MySQL client and the Perl debugger can also use the readline library.
"""

Python also uses the readline library; you should add the "$if Bash".
msg115675 - (view) Author: (stephenk) Date: 2010-09-05 22:41
Didn't know about the inputrc conditional; that works.  I verified that magic-space (without the conditional) also interferes with mysql, so this seems like less of an oversight on the side of python and more of a bash-user-beware situation.

Anyway, thanks for the workaround!
History
Date User Action Args
2022-04-11 14:57:06adminsetgithub: 53957
2010-09-07 11:07:25amaury.forgeotdarcsetstatus: open -> closed
2010-09-05 22:41:05stephenksetstatus: pending -> open

messages: + msg115675
2010-09-05 19:48:28amaury.forgeotdarcsetstatus: open -> pending

nosy: + amaury.forgeotdarc
messages: + msg115670

resolution: not a bug
2010-09-03 02:17:02stephenksetmessages: + msg115412
2010-09-03 02:11:16stephenkcreate