4

I am relatively new to Python and for the beginning I have chosen Spyder as an IDE. At the moment I am working on an optimization problem and want to keep the results for further postprocessing.

If I run the code using F5 (or "Run>Run") the file is being executed with its output on the console but nothing appears in the variable explorer. On the other hand, if I select the entire code and press F9 (or "Run>Run Selection") all variables appear in the variable explorer which is actually what I want.

The reason is probably that pressing F5 closes the current console whereas pressing F9 keeps it open and shows the globals() content as explained in (https://pythonhosted.org/spyder/variableexplorer.html). My Spyder version is 2.25 and OS Ubuntu Linux 14.04 x64.

Is there any way to change this behaviour so that I don't have to mark all the code and execute it everytime I want to see the variables in the explorer? I might be a simple question but would make my work easier ;-)

Thanks in advance!

Cord

Cord Kaldemeyer
  • 6,405
  • 8
  • 51
  • 81
  • 2
    I have found the solution (error) myself. I still had the run option "Execute in a new dedicated Python interpreter" set for that specific file. Thanks, anyway.. ;) – Cord Kaldemeyer Sep 26 '14 at 11:20
  • 1
    This article actually helped me to find the error and is recommendable for people who are new to Spyder: http://www.southampton.ac.uk/~fangohr/blog/spyder-the-python-ide.html#switch-to-an-ipython-console – Cord Kaldemeyer Sep 26 '14 at 11:27
  • (*Spyder dev here*) If you update to Spyder `2.3.1` you'll find that that article is now part of Spyder, i.e. it's its new tutorial :) – Carlos Cordoba Sep 26 '14 at 13:06

0 Answers0