Message269049
I addressed Martin's comments (thank you!) in
https://github.com/lelit/cpython/commits/issue22228_2, removing pointless
usage of a macro and avoiding usage of module's state to store the "next line
index", keeping it in a plain static variable.
Let me know how it looks now.
Martin Panter writes:
> Python’s “readline” module currently has runtime detection of Editline vs
> Gnu Readline. I am not sure if it is strictly needed, or just that it was
> easier than build-time detection, as hinted in
> <https://bugs.python.org/issue6877#msg92654>. It is confusing, because we
> have other build-time detection of particular Readline features.
Yes, it confused me too. Also, there is at least one spot in setup_readline()
that seems wrong to me, because it does not consider if it's effectively using
libedit:
#ifndef __APPLE__
if (!isatty(STDOUT_FILENO)) {
/* Issue #19884: stdout is not a terminal. Disable meta modifier
keys to not write the ANSI sequence "\033[1034h" into stdout. On
terminals supporting 8 bit characters like TERM=xterm-256color
(which is now the default Fedora since Fedora 18), the meta key is
used to enable support of 8 bit characters (ANSI sequence
"\033[1034h").
With libedit, this call makes readline() crash. */
rl_variable_bind ("enable-meta-key", "off");
}
#endif
> Perhaps you may be able to try out Editline using my patch for Issue 13501,
> but in my experience, the non-Apple patched Editline is too buggy to be
> useful in Python for much more than experimentation.
I will try to find some spare time to spend on this, but unfortunately I can
not promise I'll be able to do that in the near future, sorry.
> I would prefer to expose more of this at the Python level, but that seems
> hard to do.
Yeah, I know (I've been here nearly from the beginning ;-). |
|
Date |
User |
Action |
Args |
2016-06-22 07:10:19 | lelit | set | recipients:
+ lelit, twouters, steven.daprano, Rosuav, berker.peksag, martin.panter |
2016-06-22 07:10:19 | lelit | link | issue22228 messages |
2016-06-22 07:10:18 | lelit | create | |
|