-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for jupyterlite #23
Comments
This should allow installation on pyolite
This should allow installation on pyolite
This should allow installation on pyolite
looks like const processMsg = async (msg: KernelMessage.IMessage) => {
await mutex.runExclusive(async () => {
await kernel.handleMessage(msg);
});
}; |
Hello and first thank you for your work import piplite
await piplite.install("ipywidgets")
await piplite.install("jupyter_ui_poll") from ipywidgets import IntSlider, Output
import time
from jupyter_ui_poll import ui_events
slider = IntSlider()
out = Output()
display(slider)
display(out)
with ui_events() as poll:
while slider.value<50 :
poll(10) # React to UI events (upto 10 at a time)
print('.', end='')
time.sleep(0.1)
print('done') and i got the following error :
I also try the trick with do_one_interation() but it doesn't work either. AttributeError: 'Pyolite' object has no attribute 'do_one_iteration' Do you have any idea to make it work? |
Currently this library only works with As far as |
Hello " One has to complete cell execution event before any widget events can be delivered into Python. " |
Does the xeus-python kernel behave differently? https://github.com/jupyterlite/xeus |
@psychemedia Issue is in jupyterlite itself, messages get blocked inside JavaScript of jupyterlite, so before any kernel gets to see those. |
2024: same issue remains with jupyterlite: async startNew(options: Kernels.IKernelOptions): Promise<Kernel.IModel> {
//...
// create a synchronization mechanism to allow only one message
// to be processed at a time
const mutex = new Mutex();
// hook a new client to a kernel
const hook = (
kernelId: string,
clientId: string,
socket: WebSocketClient,
): void => {
//...
const processMsg = async (msg: KernelMessage.IMessage) => {
await mutex.runExclusive(async () => {
await kernel.ready;
await kernel.handleMessage(msg);
}); |
Currently code assumes that IPython is using ZMQ based kernel. I think it should be possible to support
pyolite
as well.Remove compulsory dependency on[DONE]zmq
andtornado
(imports and packaging)replay
function to behave differently based on underlying kernel used byIPython
The text was updated successfully, but these errors were encountered: