You are not logged in.

#1 2012-05-07 17:02:28

eggplantbren
Member
Registered: 2009-11-04
Posts: 73

[Partially Solved] IPython problem

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

#2 2012-05-08 20:41:13

eggplantbren
Member
Registered: 2009-11-04
Posts: 73

Re: [Partially Solved] IPython problem

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

#3 2012-05-08 21:30:14

eggplantbren
Member
Registered: 2009-11-04
Posts: 73

Re: [Partially Solved] IPython problem

Ack! It broke again. :-(

Offline

#4 2012-05-09 17:15:34

Lux Perpetua
Member
From: The Local Group
Registered: 2009-02-22
Posts: 73

Re: [Partially Solved] IPython problem

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

#5 2012-05-09 18:25:52

Yurlungur
Member
From: USA
Registered: 2012-01-06
Posts: 116

Re: [Partially Solved] IPython problem

Try explicitly telling ipython to use the default configuration:

$ ipython profile create
lux perpetua wrote:

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

#6 2012-05-10 17:42:49

eggplantbren
Member
Registered: 2009-11-04
Posts: 73

Re: [Partially Solved] IPython problem

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

#7 2012-05-11 18:15:26

eggplantbren
Member
Registered: 2009-11-04
Posts: 73

Re: [Partially Solved] IPython problem

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

#8 2012-05-11 21:08:35

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: [Partially Solved] IPython problem

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)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#9 2012-05-11 21:38:19

eggplantbren
Member
Registered: 2009-11-04
Posts: 73

Re: [Partially Solved] IPython problem

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

#10 2012-05-12 18:33:43

Yurlungur
Member
From: USA
Registered: 2012-01-06
Posts: 116

Re: [Partially Solved] IPython problem

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

#11 2012-05-15 17:08:23

Lux Perpetua
Member
From: The Local Group
Registered: 2009-02-22
Posts: 73

Re: [Partially Solved] IPython problem

eggplantbren wrote:

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

Board footer

Powered by FluxBB