Name:
[4322] RichardBronosky
Member:
64 months
Authored:
1 videos
Description:
I owe my career to free software, open standards, and opportunity to tinker with the source code of fantastic tools. I come from humble roots can could never have afforded the cost of entry to developing with commercial tools. I make a point to contribute to the communities that have contributed s ...
Contrasting IPython on Leopard with and without readline [ID:502] (1/1)
in series: Contrasting IPython on Leopard with and without readline
video tutorial by RichardBronosky, added 01/08
When I upgraded to Leopard, I noticed some craziness with IPython. It was very hard to verbalize and nearly impossible to Google. Luckily I use SSH, Gnu screen, and VIM all day everyday and have a lot of experience with terminal emulation issues. One of the big culprets there is "readline". I was able to find discussions about Leopard Ipython and readline, but not the weirdness I was trying to solve.
So, why the ShowMeDo? "Googlability". I'll describe the problem verbally so that others can take comfort in knowing they are not alone.
After installing Mac OS X Leopard, I ran into trouble with IPython acting crazy! I noticed when launching IPython that it said Leopard libedit was detected. (It turns out that this is a crucial detail.) IPython seemed to work fine at first. I had tab completion and such, but when defining functions on the fly, I had to indent my code manually with spaces. The real weirdness occurred when trying to use the up arrow to navigate through the command history. When a multi-line history entry (like a method/function definition, for loop, or if block) was encountered, the left alignment went all wrong. Things would continue to get worse with every key stroke. All you can say is "Worse Than Failure."
There are a lot of discussions about Leopard, Python, and readline that will turn up on Google, but most deal with the versions of IPython that where out before the Leopard launch. The "readline.parse_and_bind" thing seems to be resolved/patched in the latest versions. But in order to solve the problem discribed above, you need ipython to find readline. I'm going to suggest that we should all be using pip at this point so I'm updating these instructions to:
sudo pip uninstall ipython;
sudo pip install readline pyreadline ipython;
My original suggestion was to install the readline EGG like so:
sudo easy_install -f http://ipython.scipy.org/dist/ readline
as described here: http://ipython.scipy.org/moin/InstallationOSXLeopard HOWEVER, the python commu
Got any questions?
Get answers in the ShowMeDo Learners Google Group.
Video statistics:
- Video's rank shown in the most popular listing
- Video plays: 1106 (since July 30th)
- Plays in last week: 0
- Published: 65 months ago

Thank-yous, questions and comments
If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?
You may also want to see our ShowMeDo Google Group to speak to our active users and authors.
All comments excluding tick-boxed quick-comments
Your video has been edited. This is an automatic post by ShowMeDo.
Your video has been edited. This is an automatic post by ShowMeDo.
Your video has been edited. This is an automatic post by ShowMeDo.
Thank you Richard! I'm still learning how to switch to my Mac and this issue with iPython was really annoying, I remember seeing your video when you first uploaded it (way before I got a Mac) - thanks for making the problem so clear!
Ian.
thanks, it's been a stone in my shoe for some time...
your commend failed for some reason so followed your link and ran:
sudo easy_install readline ipython
perfect!
thanks, it's been a stone in my shoe for some time...
You saved my life! Great :D
Thank you very very much!
I was looking _exactly_ for that! (It's better shown than described...) Thanks a lot!
Video published, thanks for contributing to ShowMeDo