Closed jrmlhermitte closed 6 years ago
so at LIX, we modified the kicker line to this:
# Make plots update live while scans run.
if user_ns['get_ipython']().has_trait("kernel"):
from bluesky.utils import install_nb_kicker
install_nb_kicker()
else:
from bluesky.utils import install_qt_kicker
install_qt_kicker()
this works. this should perhaps reside somewhere upstream (in bluesky install_nb_kicker?)
the inline backend is not interactive so it would not work.
at LIX, they should not be installing the kicker in an analysis notebook as you only need the kicker to get the RE to update figures while the asyncio event loop is running.
I don't think has_kernel
is the right approach: see this comment. If the backend is 'inline', then plots aren't interactive anywhere, so the correct behavior of install_kicker
should be to do nothing, right?
@tacaswell is right. We should not need RE in this instance. They don't run bluesky in notebooks. Given that discussion you refer @danielballan , it sounds safer to look for backend strings.
So I'll close this. :-)
This is because
install_kicker
performs:and the output of the matplotlib backend is not one of the cases in the if statements:
Quick solution : Add
'module://ipykernel.pylab.backend_inline'
to the possible cases in the if statements. But likely we should think more carefully on this.