You are not logged in.
Hi all. I use IPython a lot, and recently something changed and it's really annoying me. I used to be able to type the beginning of a line and press up, and it would go into my history to find the command I had started typing. However, in the last two days, up just gets my last command, which is not what I want. The weird thing is that sometimes it works and sometimes it doesn't. I didn't think there were any recent upgrades that would affect this. Any ideas?
Last edited by eggplantbren (2012-05-11 22:33:05)
Offline
I don't know what went wrong, but deleting my ~/.config/ipython directory seems to have worked. If it breaks again, I'll come back and unmark the thread as solved.
Offline
Ack! It broke again. :-(
Offline
Which IPython are you using? I just tested this on ipython2 0.12.1-1, and it did the completion properly.
Update - I just took a trip through my ~/.config/ipython directory, and there seems to be nothing interesting in there, just my history.sqlite, which appears to be nothing but my ipython input history.
Last edited by Lux Perpetua (2012-05-09 17:28:22)
Offline
Try explicitly telling ipython to use the default configuration:
$ ipython profile create
Which IPython are you using? I just tested this on ipython2 0.12.1-1, and it did the completion properly.
I believe that the commands 'ipython2' and 'ipython' actually call the same piece of software and use the same config files. When you run it with python3, you're using a compatibility package.
Python 3 info
Last edited by Yurlungur (2012-05-09 18:30:35)
Lenovo Thinkpad T420; Intel sandy bridge i7 2.7GHz; integrated graphics card; 4GB RAM; wifi; Arch; Xmonad WM
Offline
Thanks for the suggestion Yurlungur. I tried it and it seemed to work, but by the time I'd exited and re-entered ipython about two more times, it was broken again. Then, rerunning that command didn't fix it a second time.
This is really frustrating and I have no idea how to even diagnose it! I just emailed the ipython mailing list, I'll let you know if anyone solves it.
Last edited by eggplantbren (2012-05-10 18:20:31)
Offline
Still no luck on solving this, except the ipython people are saying it's probably a problem with readline. I did notice an update to readline in the last couple of weeks, but I checked the diffs and it looks like they just moved some libraries into a different directory, no patches or anything were applied.
Offline
Does it work in your shell? The ipython people are correct, this is a problem with readline.
Check to make sure that the following is in either /etc/inputrc or ~/.inputrc:
"\e[A":history-search-backward
"\e[B":history-search-forward
Last edited by Stebalien (2012-05-11 21:09:41)
Offline
Hi Stebalien,
Actually, I've never had that feature in my shell. But now I do, and ipython is fixed as well. Awesome! Thanks so much!
Edit: I spoke too soon - it's broken again sometimes, but less frequently than before. Is anyone else having readline problems? I copied the /etc/inputrc to ~/.inputrc as well just in case, but that didn't seem to help. I wonder if it might be a gnome-terminal problem? I'll try using a different terminal emulator.
Last edited by eggplantbren (2012-05-11 22:32:48)
Offline
I just use it in xterm, and I've had no problems.
There should definitely be a work around for this, since the ipython config file is a python script...
Lenovo Thinkpad T420; Intel sandy bridge i7 2.7GHz; integrated graphics card; 4GB RAM; wifi; Arch; Xmonad WM
Offline
I wonder if it might be a gnome-terminal problem? I'll try using a different terminal emulator.
Interesting; I hadn't thought of that. I've found gnome-terminal to be buggy in the past (meaning years ago), but I haven't used it recently. Another thing you could try is running IPython without X-windows by pressing Ctrl+Alt+F2 and logging into the text console. You can switch back to your X session at any time by pressing Ctrl+F7.
Last edited by Lux Perpetua (2012-05-15 17:09:22)
Offline