Ronald Oussoren <ronaldousso...@mac.com> added the comment:

The attached patch is a slightly cleaner version of your patch. What I 
don't like is that I'm also using runtime detection of libedit, I'd 
prefer compile-time detection but that doesn't seem possible without 
doing that dtection in setup.py.

My changes w.r.t. your patch:
* Do the libedit detection once when the readline module is initialised.
* Place libedit support in "#ifdef __APPLE__" blocks, the code might
  work with other libedit's (such as the one in NetBSD) as well, 
  but I cannot test that and don't want to risk breaking other 
  platforms.
* Also patch readline.get_history_item
* Change readline.__doc__ when using libedit's readline emulation

The patch seems to work on fine, including browsing in ipython's history 
on 10.6.

PS. I mentioned ipython because I know there were issues with ipython 
and Apple's python when Leopard was just out. I don't use ipython myself 
and hence don't know if they have added workarounds in their code (or if 
Apple fixed the issues the ran into)

Marking this issue as 'needs review' for two reasons:
1) I'm not familiar with the readline code
2) I'd like to know if this patch is backport material

----------
keywords: +26backport, needs review
versions:  -Python 2.5, Python 3.0
Added file: http://bugs.python.org/file14895/readline-libedit.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6877>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to