[IPython-user] Embedded IPython and readline under MacOS-X
Fernando Perez
Fernando.Perez at colorado.edu
Mon Apr 4 03:40:28 CDT 2005
Frédéric Mantegazza wrote:
> Hello,
>
> Here is a strange behaviour of IPython under MacOS-X:
>
> - If I start IPython in a shell, with ipython script, readline is available
> and completion and history work fine.
>
> - If I start IPython from IPShellEmbed class, then readline is not
> available, so completion and history do not work.
I don't have an OSX machine to test on right now, but given the recent
readline/osx discussion on this list, I'm going to venture a hypothesis. Our
OSX regulars can correct me if I'm off the mark.
I imagine that when you run ipython, you are picking up the fink-supplied
python, which DOES have readline. In contrast, if you type
$ python yourscript.py
the first python in your $PATH will be the Apple-supplied one, which is
missing readline.
You can test this by running your little embedding example as
$ /sw/bin/python yourscript.py # or whatever the path to fink's python is
If readline works in this case, it means I'm right. Otherwise, I'll defer the
solution to our OSX users who can actually test things instead of making
guesses out of thin air like I'm doing right now :)
best,
f
More information about the IPython-user
mailing list