Python 3.1.3

Ned Deily nad at acm.org
Sun Nov 28 12:03:00 EST 2010


In article <roy-F66D8A.11273628112010 at news.panix.com>,
 Roy Smith <roy at panix.com> wrote:
> I'm seeing the same behavior on a build I did of
> 
> Python 3.2a4+ (py3k:86538, Nov 19 2010, 20:52:31)
> 
> last week, also on 10.6.5.  From the configure output, it looks like it 
> found readline:
> 
> py3k$ grep -i readline config.status 
> D["HAVE_LIBREADLINE"]=" 1"
> 
> but it's not acting like it.  The Python 2.6.1 which came with the 
> system works properly.

As noted, Python 3.2 on OS X should link to the OS X copy of the BSD 
editline (libedit).  You may have to adjust your PYTHONSTARTUP script to 
use the different commands.  Here's a snippet from mine:

try:
    import readline
except ImportError:
    print("Module readline not available.")
else:
    import rlcompleter
    if 'libedit' in readline.__doc__:
        readline.parse_and_bind("bind ^I rl_complete")
    else:
        readline.parse_and_bind("tab: complete")

http://docs.python.org/py3k/library/readline.html
Also, see: man 5 editrc

BTW, python.org 3.2a4 installers for OS X are now available so you might 
not need to build your own:

http://www.python.org/download/releases/3.2/

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list