"Maintain focus ..." option has no effect in Spyder4
See original GitHub issueProblem Description
What steps reproduce the problem?
- Open
Tools > Preferences > Editor > Run Code
and disable the “Maintain focus in the Editor after running cells or selections” option. - Execute
Run > Run cell
(orCrtl + Return
)
What is the expected output? What do you see instead?
The cell is executed in the current/dedicated console as expected. However, the focus stays in the editor and does not switch to the console. This is the same behavior as when the “Maintain focus …” option is enabled, i.e., disabling the option has no apparent effect. This seems to be a Spyder4 specific issue: In previous versions (Spyder3), the focus would switch to the console if the “Maintain focus …” option was disabled.
Versions
- Spyder version: 4.0.1
- Python version: 3.6.7
- Qt version: 5.12.5
- PyQt version: 5.12.3
- Operating System name/version: Windows 10
Also happens on an installation with Spyder 4.0.0, Windows 7 and Python 3.7.
Dependencies
atomicwrites >=1.2.0 : 1.3.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
cloudpickle >=0.5.0 : 1.2.2 (OK)
diff_match_patch >=20181111 : 20181111 (OK)
intervaltree : None (OK)
IPython >=4.0 : 7.12.0 (OK)
jedi =0.14.1 : 0.14.1 (OK)
nbconvert >=4.0 : 5.6.1 (OK)
numpydoc >=0.6.0 : 0.9.2 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=0.3 : 5.6.7 (OK)
pygments >=2.0 : 2.5.2 (OK)
pylint >=0.25 : 2.4.4 (OK)
pyls >=0.31.2;<0.32.0 : 0.31.7 (OK)
zmq >=17 : 18.1.1 (OK)
qdarkstyle >=2.7 : 2.8 (OK)
qtawesome >=0.5.7 : 0.6.1 (OK)
qtconsole >=4.6.0 : 4.6.0 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
rtree >=0.8.3 : 0.9.3 (OK)
sphinx >=0.6.6 : 2.3.1 (OK)
spyder_kernels >=1.8.1;<2.0.0: 1.8.1 (OK)
watchdog : None (OK)
cython >=0.21 : None (NOK)
matplotlib >=2.0.0 : 3.1.2 (OK)
numpy >=1.7 : 1.18.1 (OK)
pandas >=0.13.1 : 1.0.1 (OK)
scipy >=0.17.0 : 1.3.2 (OK)
sympy >=0.7.3 : None (NOK)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Sypder 2 IDE - keep the focus in the editor after sending ...
The main thing that annoys me is that every time I select some python commands to send to my Python command line, the...
Read more >IPython Console — Spyder 5 documentation
The IPython Console allows you to execute commands and interact with data inside IPython interpreters. ... To launch a new IPython instance, go...
Read more >Your SpyderLENSCAL™ Guidebook
Your SpyderLensCal is designed to give you razor-sharp focusing using modern DSLR autofocus micro-adjustment. And because it's completely portable, you can ...
Read more >Customizing the IDE - SpiderBasic
If set, the IDE title bar will show the full path to the currently edited file. If not, only the filename is shown....
Read more >Python - Tkinter Listbox
options − Here is the list of most commonly used options for this widget. These options can be used as key-value pairs separated...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @pavolgaj did you try the changes in the PR metioned by @ccordoba12 (https://github.com/spyder-ide/spyder/pull/16977) ? I checked them and seems like the problem is solved with those changes (the focus in the Editor stays depending on the
Maintain focus ...
option when running code with the cell/selection functionality). They will be available with Spyder 5.2.1 (our next release to be done)There are previous changes required to make that option work as expected. Please wait until 5.2.1 is released and if the option is not working for you, then open a new issue.