You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be a silly use case, but I noticed that if we are using Output widget under IPython's %%capture magic or capture_output contextmanger, it cannot capture print which goes on top level IPython capture only.
fromIPython.utils.captureimportcapture_outputfromipywidgetsimportOutputout=Output()
withcapture_output() ascap: # could be %%capture capprint("1. In main capture")
without:
print("2. Still in main capture")
display("3. In Output widget")
print('4. before displaying out')
display(out) # only display will be shown here but at endprint('5. after displaying out')
cap.show()
It seems like Output is not able to acquire some kind of system display hooks. This also results in unordered output.
The text was updated successfully, but these errors were encountered:
It might be a silly use case, but I noticed that if we are using
Output
widget under IPython's%%capture
magic orcapture_output
contextmanger, it cannot captureprint
which goes on top level IPython capture only.It seems like
Output
is not able to acquire some kind of system display hooks. This also results in unordered output.The text was updated successfully, but these errors were encountered: