In the spirit of being actually helpful, here's a couple of links that might work to get readline installed:

http://ipython.scipy.org/dist/ (readline binary for mac)
http://incrediblevehicle.com/2009/06/11/readline-python-ipython-and-mac-os-x/
http://stackoverflow.com/questions/726449/installing-ipython-with-readline-on-the-mac

--
--Leo

Leo Shklovskii wrote:
I suspect you don't have readline installed. It's a pita on both Mac and Windows to get it working to use iPython properly. I know the steps to take on Windows but there are multiple variations of how to get readline set up on OS X and I don't know which one is the best one for your usecase.

--
--Leo

Richard Fuhr wrote:
In yesterday evening's nice presentations on numpy, the speakers mentioned the use of iPython, to provide an improved interactive Python shell experience, so I decided to give it a try.

One feature that it claims to have, but which I could not get to work, is automatic indentation. I have fiddled with it a bit, but am still perplexed. For instance, here is a sample session in which I set autoindent, but it does not seem to take effect. Does anyone have any suggestions? I am using a Mac, running Snow Leopard, and just launching ipython from a Terminal session.

Richard-Fuhrs-iMac:ipythonlearn richardfuhr$ ipython
Leopard libedit detected.
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
Type "copyright", "credits" or "license" for more information.

IPython 0.10.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: autoindent
Automatic indentation is: OFF

In [2]: autoindent
Automatic indentation is: ON

In [3]: for i in range(10):
   ...: print i # I expected autoindent to take effect
------------------------------------------------------------
IndentationError: expected an indented block (<ipython console>, line 2)


In [4]: quit()
Do you really want to exit ([y]/n)? y
Richard-Fuhrs-iMac:ipythonlearn richardfuhr$




Reply via email to