I am trying to read a slider value in an infinite loop, but there is no print output. My goal is to control a robot with sliders, and the robot needs a constant stream of information even if the slider value doesn't change, thus the infinite while loop.
import ipywidgets as widgets
from IPython.display import display
slider = widgets.IntSlider()
display(slider)
while True:
if slider.value != 0:
print(slider.value)