|
|

楼主 |
发表于 2006-11-26 17:13:21
|
显示全部楼层
python的readline模块是GNU Readline Library的一个封装,Readline 软件包是一个提供命令行编辑和历史纪录功能的库集合。
如果没有readline模块的话,运行ipython就是这样,无法使用Tab键自动补全,无法使用命令历史功能来方便地进行程序的调试(注意下面的警告及ipython的提示符):
$ ipython
WARNING: Readline services not available on this platform.
WARNING: The auto-indent feature requires the readline library
Python 2.4.3 (#1, Nov 26 2006, 16:39:35)
Type "copyright", "credits" or "license" for more information.
IPython 0.6.15 -- An enhanced Interactive Python.
? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]:
用strace追踪ipython的执行时,可以看到ipython在找readline.so、readline.py、readline.pyc及readlinemodule.so文件,可是一个也不存在。 |
|