I cannot reproduce that in iPython alone: if you really think it's a problem in iPythonm redirect me there.
Now try to go back in the history with the arrows:
What steps will reproduce the problem?
In [0]: A = [1,2.3]; print(len(A))
In [1]: runfile('/home/myhome/Projects/python/spam.py', wdir='/home/myhome/Projects/python')
In [0] by moving with the keyboard arrows: You get stuck in the runfile command and must delete it first before going to the previous history.What is the expected output? What do you see instead?
I would expect it to work like if you just write in the console, arrows only move in history, not within the string.
Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:
IPython >=1.0 : 4.2.0 (OK)
jedi >=0.8.1;<0.9.0: 0.9.0 (NOK)
matplotlib >=1.0 : 1.5.1 (OK)
pandas >=0.13.1 : 0.18.1 (OK)
pep8 >=0.6 : 1.7.0 (OK)
psutil >=0.3 : 4.2.0 (OK)
pyflakes >=0.6.0 : 1.2.3 (OK)
pygments >=1.6 : 2.1.3 (OK)
pylint >=0.25 : 1.5.6 (OK)
qtconsole >=4.0 : 4.2.1 (OK)
rope >=0.9.2 : 0.10.3 (OK)
sphinx >=0.6.6 : 1.4.3 (OK)
sympy >=0.7.3 : 1.0 (OK)
zmq >=2.1.11 : 15.2.0 (OK)
Well, if you move inside a command with the left arrow, then you can't browse your history with the up and down arrows.
You can avoid deleting the line if you moved inside it by moving to the beginning of it. Then up and down work again.
The same is true in the terminal version of IPython.
That's not true. I don't move with the left arrow, only up/down and this happens. If I go to the begining, nothing happen, until I delete the whole line. I checked in the IPython QtConsole and in the terminal, nothing like this occurs.
Please reopen the issue.
Well, I can't reproduce this problem, sorry. And I also work on Linux, so I don't know what to do :-/
It's installed from pip, with python3. Maybe it's different? I'll try home on my archlinux
Same on archlinux with spyder 2.3.9, I'm stuck with the runfile('xx'). Cannot come back to history of something else than run scripts.
Same happens sometime with the new spyder 3.
I wonder if the issue may occur when the "runline" command is long and cannot fit on a single line. In this case when you "arrow up", the cursor goes to the end of the 1st line rather than to the end of the command. Maybe this can get you in the situation described in the comment by CCordoba dated 8 june where he originally closed the bug.
@callegar, I also think this problem happens when a command doesn't fit in one line (i.e. it's wrapped to another line). Then if you use arrow up, history is not displayed correctly.
I have been experiencing the same problem ever since I am using spyder. I agree it occurs when the command, usually "runline" does not fit on a single line. It occurs on 2.x and 3.x versions I was using (on mac osx). I would really appreciate some workarounds as it gets quite time consuming in the long run.
Yup just dropped into this hole when updating Anaconda from 4.0.something (a few months old; been using Anaconda / Spyder for 2 years on a Win 7 PC and all OK so far...) but now with Anaconda 4.2.0 IPython history is borked. Tried updating to 3.0.2 but just the same.
Identical symptom. Up arrow (ONLY - no other keys used) normal until history hits a runfile statement and is stuck. History now appears to select lines with runfile at head.
This makes Spyder history unusable. Back to Windows console!
This problem happens when the runfile command is longer than the width of the console, but it's not really our fault. It's a problem from qtconsole.
@mariacamilaremolinagutierrez, I'm assigning this one to you, but for this one you need to work in the qtconsole repository:
https://github.com/jupyter/qtconsole
find the problem there and upload a PR with your fix :-)
Thanks Carlos and Maria Camila for looking into this even if it is not a bug in spyder. As a user, I really appreciate it.
This issue will be resolved with a PR in the qtconsole repo https://github.com/jupyter/qtconsole/pull/173
Closing as there's nothing else we can do on the Spyder side.