Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable explorer : multiple windows open and impossible to close them with shortcuts #21814

Open
JulietteCx opened this issue Feb 19, 2024 · 5 comments

Comments

@JulietteCx
Copy link

JulietteCx commented Feb 19, 2024

Description

What steps will reproduce the problem?

In the variable explorer pane multiple windows open when clicking on a variable (say a list) but they do not update whenever we run the code again, nor get closed automatically. This results in a lot of windows open and no shortcut to clear all of that. Thanks for your help.

Versions

  • Spyder version: 5.4.3 (conda)
  • Python version: 3.11.3 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.7
  • Operating System: Darwin 22.4.0

Dependencies

# Mandatory:
applaunchservices >=0.3.0                        :  0.3.0 (OK)
atomicwrites >=1.2.0                             :  1.4.0 (OK)
chardet >=2.0.0                                  :  4.0.0 (OK)
cloudpickle >=0.5.0                              :  2.2.1 (OK)
cookiecutter >=1.6.0                             :  1.7.3 (OK)
diff_match_patch >=20181111                      :  20200713 (OK)
intervaltree >=3.0.2                             :  3.1.0 (OK)
IPython >=7.31.1,<9.0.0,!=8.8.0,!=8.9.0,!=8.10.0 :  8.12.0 (OK)
jedi >=0.17.2,<0.19.0                            :  0.18.1 (OK)
jellyfish >=0.7                                  :  0.9.0 (OK)
jsonschema >=3.2.0                               :  4.17.3 (OK)
keyring >=17.0.0                                 :  23.13.1 (OK)
nbconvert >=4.0                                  :  6.5.4 (OK)
numpydoc >=0.6.0                                 :  1.5.0 (OK)
parso >=0.7.0,<0.9.0                             :  0.8.3 (OK)
pexpect >=4.4.0                                  :  4.8.0 (OK)
pickleshare >=0.4                                :  0.7.5 (OK)
psutil >=5.3                                     :  5.9.0 (OK)
pygments >=2.0                                   :  2.15.1 (OK)
pylint >=2.5.0,<3.0                              :  2.16.2 (OK)
pylint_venv >=2.1.1                              :  2.3.0 (OK)
pyls_spyder >=0.4.0                              :  0.4.0 (OK)
pylsp >=1.7.2,<1.8.0                             :  1.7.2 (OK)
pylsp_black >=1.2.0                              :  1.2.1 (OK)
qdarkstyle >=3.0.2,<3.2.0                        :  3.0.2 (OK)
qstylizer >=0.2.2                                :  0.2.2 (OK)
qtawesome >=1.2.1                                :  1.2.2 (OK)
qtconsole >=5.4.2,<5.5.0                         :  5.4.2 (OK)
qtpy >=2.1.0                                     :  2.2.0 (OK)
rtree >=0.9.7                                    :  1.0.1 (OK)
setuptools >=49.6.0                              :  67.8.0 (OK)
sphinx >=0.6.6                                   :  5.0.2 (OK)
spyder_kernels >=2.4.3,<2.5.0                    :  2.4.3 (OK)
textdistance >=4.2.0                             :  4.2.1 (OK)
three_merge >=0.1.1                              :  0.1.1 (OK)
watchdog >=0.10.3                                :  2.1.6 (OK)
zmq >=22.1.0                                     :  25.1.0 (OK)

# Optional:
cython >=0.21                                    :  None (NOK)
matplotlib >=3.0.0                               :  3.8.0 (OK)
numpy >=1.7                                      :  1.25.2 (OK)
pandas >=1.1.1                                   :  2.0.3 (OK)
scipy >=0.17.0                                   :  1.11.3 (OK)
sympy >=0.7.3                                    :  None (NOK)
@ccordoba12
Copy link
Member

Hey @JulietteCx, thanks for reporting. You said:

In the variable explorer pane multiple windows open when clicking on a variable (say a list) but they do not update whenever we run the code again

This will change in Spyder 6 because we added a refresh button to our viewers. So users will be able to update them without closing and reopening variables.

Unfortunately, we can't refresh our viewers automatically after every run because viewing a variable requires making a copy in memory of it. So, if you have a lot of variables open, Spyder will start consuming a lot of memory.

nor get closed automatically. This results in a lot of windows open and no shortcut to clear all of that. Thanks for your help.

We haven't considered this use case before, so thanks for bringing it to our attention. I understand this can be a nuisance with many viewers open. And I like the idea of having a shortcut to close them all at once (which shouldn't be that hard to implement).

What do you think about also adding a shortcut to close the current viewer? Would you find that useful?

@JulietteCx
Copy link
Author

JulietteCx commented Feb 21, 2024 via email

@ccordoba12
Copy link
Member

If there was a shortcut to clear all the windows I think that would be a huge improvement already! :)

I totally agree. Since we're wrapping up Spyder 6.0, it's probably not going to be available for that version. But I hope we'll have time to implement it for 6.1, to be released during the second half of the year.

For the shortcut to close the current viewer, I am sorry but not so sure what you’re referring to. Might you clarify and I can let you know? Thanks!

I meant the following:

  • Click on a variable to quickly check its contents.
  • A viewer is open for it.
  • Since I just needed that for a quick peek, I don't want to keep that viewer open. So perhaps it'd be useful to simply press a shortcut (say Ctrl+W) to close the viewer and go back to Spyder to keep working on it.

@JulietteCx
Copy link
Author

JulietteCx commented Feb 21, 2024 via email

@ccordoba12
Copy link
Member

Thanks for the extra input @JulietteCx! We'll take it into account when implementing this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants