Ask any question about QuantStack projects: xtensor, xeus, voila, Jupyter widgets, mamba
UPDATE: Running more test using the old code (that works) and comparing it with the code that i linked previously I noticed that if I stack two cells one with the form :
#CELL 1
import plotly.express as px
import pandas as pd
import ipywidgets as widgets
out=widgets.Output()
dfa=pd.DataFrame({'x':[1,2,3],'y':[1,2,3]})
with out:
out.clear_output(wait=True)
print('ciao')
fig=px.scatter(dfa,x='x',y='y', width=800, height=400 )
fig.show()
out
and one with the form :
#CELL 2
with out:
out.clear_output(wait=True)
print('ciao')
fig=px.scatter(dfa,x='x',y='y', width=800, height=400 )
fig.show()
out
A weird thing happens. If I run CELL1 i get an empty output, then I run CELL2 and i still get an empty output, but the output from CELL1 now shows the plot from CELL2.
@JohanMabille I very much like this roadmap! Happy new year btw...
thanks :) Happy new year too!
Hi there, I am using voila to render a notebook in jupyterHub environement. I would like to create a kind of "Launcher" opening several tabs in chrome by clicking buttons. I have this code:
import ipyvuetify as vue
from ipywidgets import Output
from IPython.display import Javascript
b = vue.Btn(class_='mx-2 light-blue darken-1', color='primary',children=['open newspapers'])
out=Output()
def open_pages(widget, event, data):
with out:
print('clicked')
display(Javascript(f'window.open("https://www.lemonde.fr");'))
print('should have opened 1')
display(Javascript(f'window.open("https://www.nytimes.com");'))
print('should have opened 2')
b.on_event('click', open_pages)
display(vue.Layout(children=[b,out]))
only one tab is open, the first one, despite of the fact that the three print statements run and no error is given back.
Any idea how to solve this issue or where can be the error?
HyperLink
widget could maybe be a good addition to ipywidgets?
if you think about it, you never have, anywhere on any website, a button or an image that opens multiple tabs at once
You are right. Perhpas the approach is somehow strange. But there is certainly a use case here. For a particular persona (type of user) and a particular task (task 1) 4 different jupyterHub voila based notebooks should be opened. For the same persona (user) but task 2, other different 5 notebook solutions should be opened. And this is totally transparent to the user, who does not even know what is python nor a notebook. the user is given a single url (the one displaying the above example). I am talking about an organization where 50 to 100 people might have code solutions in notebooks and where another 6000 people dont even know that is a notebook.
and actually, having an
HyperLink
widget could maybe be a good addition to ipywidgets?
@martinRenou everything that avoids the user to have to go to JavaScript is a super plus. When bringing engineers to code who dont have CS background, neither any coding experience, speaking about more than one single language (being Python) is a no go. The moment you go: "well for this you need JS or HTML or..." its over. One of the superpowers of jupyterHub is that is one environment - one language. full stop. Its the most convenient place for non-CS background people.