question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Browse history in IPython console after running script is not working

See original GitHub issue

I cannot reproduce that in iPython alone: if you really think it’s a problem in iPythonm redirect me there.

Description of your problem

Now try to go back in the history with the arrows: What steps will reproduce the problem?

  1. Do stuff in the IPython console. For instance:
In [0]: A = [1,2.3]; print(len(A))
  1. Run a script by clicking the “Play” icon.
In [1]: runfile('/home/myhome/Projects/python/spam.py', wdir='/home/myhome/Projects/python')
  1. Try to repeat the command of 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.

Versions and main components

  • Spyder Version: 2.39
  • Python Version: 3.4.2
  • Operating system: Debian Jessie

Dependencies

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)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Dec 9, 2016

Closing as there’s nothing else we can do on the Spyder side.

1reaction
sergiocallegaricommented, Nov 25, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ipython: print complete history (not just current session)
In ipython enter: %history -g. It does not print time codes but it does print session/line number.
Read more >
History — Spyder 5 documentation
With the History pane, you can view the recent code and commands you've entered into any IPython Console, along with their timestamp.
Read more >
IPython reference — IPython 3.2.1 documentation
If invoked with no options, it executes all the files listed in sequence and drops you into the interpreter while still acknowledging any...
Read more >
IPython and Shell Commands | Python Data Science Handbook
When working interactively with the standard Python interpreter, ... you a syntax for executing shell commands directly from within the IPython terminal.
Read more >
More on the IPython System - Python for Data Analysis, 2nd ...
After figuring out the problem and modifying data_script.py, you can start typing a few letters of the %run command and then press either...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found