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.

Console refactoring / improvements / bug fixes

See original GitHub issue

❓ Questions and Help

Following some work from @shanaxel42 in #784 to better manage our console resources it is worth raising some additional questions around the expected behavior of the console in interactive environments like when napari is launched from IPython or Jupyter.

Right now if launched from IPython the button to open the console is there but pressing it does nothing and the console is not created. I think we should remove the button and stick with the principle that if launching from IPython you do not need a built-in console in napari. How does @jni feel about this?

Right now if launched from Jupyter we actually create a console and sync it with the jupyter notebook, but there is a weird issue where you now have to press shift-enter in the console to get things to execute. This is very confusing I think, and I’m not sure that we should provide a console in this case either. I propose we remove both the console and the console button when launching from jupyter.

Finally when launching from a script that contains two napari.Viewer() like calls strange things happen where both consoles get connected to the same kernal, typing in either though only makes output appear in the 2nd created one and the viewer variable gets overwritten so only the 2nd create Viewer is referred too. This is very strange, but I’m not sure how to improve it and very open to suggestions

In general there also might be an opportunity for @shanaxel42 to remove some unneeded code from QtConsole depending on how we resolve these questions, and potentially come up with a cleaner fix for #618 at the same time

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
tlambert03commented, Dec 12, 2019

for what it’s worth, I agree with all these things. no need for icon when launching from ipython or jupyter (or at the very least no shift-enter if possible when launching from jupyter… remove altogether if not possible). and don’t clober viewer variable, but do something like create a second variable name if viewer is in globals() and emit a warning…

0reactions
sofroniewncommented, Aug 7, 2020

The remaining work to still address in this issue is now captured by #1530 and #1531 and this issue can be closed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rename refactoring improvements with new Dart Editor build
Rename refactoring improvements with new Dart Editor build ... Read the full change log or start with the Dart Editor tutorial. Thanks in...
Read more >
WebStorm 2022.3.1 Is Now Available - The JetBrains Blog
Vue bug fixes. We fixed over 40 Vue-related issues in WebStorm 2022.3 and have made several more Vue improvements in this bug-fix update:....
Read more >
August 2020 (version 1.49) - Visual Studio Code
This major update brings support for new language features such as variadic tuple types, along with editor tooling enhancements and many bug fixes....
Read more >
Console.ReadKey improvements in .NET 7
One of the aspects that was improved in RC1 was Console. ... NET 7, all known bugs related to recognizing keys pressed inside...
Read more >
Rewriting, refactoring, rearchitecting - when is the right time?
Customers expect rapid bug fixes, regular iteration and ongoing improvements. It's difficult to get the balance between good engineering and ...
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