[Pythonmac-SIG] How can python incorporate GNU's readline library?

Bob Ippolito bob at redivi.com
Tue May 3 00:10:38 CEST 2005


On May 2, 2005, at 5:52 PM, Frederick C. Lee wrote:

> Greetings:
>      I've just installed Tiger (MacOSX 10.4).  My current Python
> version is:
>
> [/Users/Ric]python
> Python 2.3.5 (#1, Mar 20 2005, 20:38:20)
> [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
>
> And I also have GNU's readline library via DarwinPorts:
>
> [/Users/Ric]port installed
> The following ports are currently installed:
>    docbook-xml 4.3_0 (active)
>    readline 5.0.005_0 (active) <--------
>    shapelib 1.2.10_0 (active)
>    sqlite 2.8.15_0 (active)
>    swig 1.3.24_0 (active)
> [/Users/Ric]
>
> But it appears that Python doesn't see the readline library.  Typing
> a ctrl-P at the Python prompt doesn't do anything.
>
> How do I make Python aware of GNU's readline library?

readline needs to be present during the process of building Python,  
because the readline extension must be built.  Simply having readline  
installed on the system isn't going to do anything.  Apple doesn't  
ship with readline (well it pretends to, but it's just BSD libedit,  
which isn't good enough for Python).

What you want to do is go to http://pythonmac.org/packages/ and  
install TigerPython23Compat (from "Mac OS X 10.4 (stock Python  
2.3.5)") and readline (from "Mac OS X 10.3 (stock Python 2.3.0)").

-bob



More information about the Pythonmac-SIG mailing list