Python的
我该怎么做才能在OS X上为Python的
readline
模块文档中写道“可用性:Unix”。然而,在OS X上似乎不可用,尽管其他标记为Unix的模块是可用的。这是我正在使用的内容:
$ uname -a Darwin greg.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386 $ which python /usr/bin/python $ python Python 2.3.5 (#1, Nov 26 2007, 09:16:55) [GCC 4.0.1 (Apple Computer, Inc. build 5363) (+4864187)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import readline Traceback (most recent call last): File "", line 1, in ? ImportError: No module named readline >>>我还通过MacPorts安装了Python 2.5,但
readline
也不可用。我该怎么做才能在OS X上为Python的
raw_input()
函数提供readline
功能呢?