1 Sep 18:12
OS X 10.6 vs iPython & readline
Steve Steiner (listsin <listsin <at> integrateddevcorp.com>
2009-09-01 16:12:27 GMT
2009-09-01 16:12:27 GMT
Is there some trick to getting the OS X readline -> libedit patch to work on a self-installed Python? Installing iPython into the system python, the specific patch, as mentioned in the URL [1] works as expected and iPython starts with: ------------------------------------------------------------------------------------------ (~/src/ipython-0.10)# ipython Leopard libedit detected. Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ------------------------------------------------------------------------------------------ With a virtualenv, sourced from a self-installed Python, even though it should be using the same general OS but a different Python binary, the libedit-ness is not detected and I just get: ------------------------------------------------------------------------------------------ (wssw1)(~/src/ipython-0.10)# ipython WARNING: Readline services not available on this platform. WARNING: The auto-indent feature requires the readline library Python 2.6.2 (r262:71600, Jun 9 2009, 10:09:41) Type "copyright", "credits" or "license" for more information. IPython 0.10 -- An enhanced Interactive Python. ------------------------------------------------------------------------------------------ Anyone know the trick for getting the built-in iPython patch to work(Continue reading)
1. Download and unpack the readline source tarball
(readline-2.5.1.tar.gz), which creates a directory 'readline-2.5.1'.
2. Obtain the source code of your self-installed Python distribution
(or in the case of a System Python, the source code of the standard
Python distribution of the same version).
3. Copy the Modules/readline.c file (containing the Python module) to
Modules/readline.c inside the 'readline-2.5.1' directory.
4. Run 'python setup.py install' and hope for the best
Regards,
Ludwig
RSS Feed