[jupyter] Re: How does jupyter show dataframe as html table ?

2017-12-19 Thread Lawrence D’Oliveiro
On Wednesday, December 20, 2017 at 3:13:55 PM UTC+13, Jeff Zhang wrote:
>
> Just wondering how does jupyter do that ?
>

Python code can format text output as HTML or Markdown, and can also output 
arbitrary PNG graphics and audio.

Examples here 
,
 
API docs here 

.

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/17c429dc-153c-4e30-b4d4-d9b446fefb61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Auto-running notebook and hooking an event on completion

2017-12-19 Thread Pouya Ghadimi Karahrodi
Is this resolved ? I am trying to automate a notebook run and conversion to 
pdf.
The missing step is the save after the notebook run completion.
I am managing this through commands:
 %run ./notebook.ipynb --inputParameters
and then 
subprocess.call(["jupyter", "nbconvert" 
,"--to=pdf","--template=template.tplx", "notebook.ipynb"]) 

Having this setup it misses the save and doesn't have the updated fields.

Any suggestion to fix this ?


On Friday, October 9, 2015 at 8:54:23 PM UTC+11, Min RK wrote:
>
> The kernel should know that it has outstanding requests, so you ought to 
> be able to query that, to determine whether.
>
> There isn’t a public API for this information, but this should work for 
> now:
>
> finished = (Object.keys(IPython.notebook.kernel._msg_callbacks).length == 0);
>
> If you check that value when idle events arrive, it should tell you when 
> the notebook is actually done or not.
>
> -MinRK
> ​
>
> On Thu, Oct 8, 2015 at 9:18 PM, Graham Wheeler  > wrote:
>
>> Hi all
>>
>> I'm trying to have a custom.js that will automatically run a notebook 
>> when it gets opened or reloaded, and then hook an event handler when done.
>>
>> I'm trying this to start:
>>
>> require(['base/js/namespace', 'base/js/events', 'base/js/dialog', 
>> 'base/js/utils', 'base/js/security'], function() {
>>   $([IPython.events]).on('kernel_ready.Kernel kernel_created.Session 
>> notebook_loaded.Notebook', run_notebook);
>> });
>>
>> That seems to work okay.
>>
>> Getting completion event handling seems more tricky. I have:
>>
>> function run_notebook() {
>>   var pageClass = document.body.className;
>>   if (pageClass.indexOf('notebook_app') >= 0) {
>> IPython.notebook.clear_all_output();
>> IPython.notebook.execute_all_cells();
>>
>>// My problem is here - how to tell when done.
>>
>>// One attempt - this seems to run over and over
>> $([IPython.events]).on('kernel_idle.Kernel', function() {
>> checkIfDone();
>> });
>>
>> // Another attempt - this doesn't seem to work at all
>> setTimeout(5000, function() {
>>   checkIfDone();
>> });
>>   }
>> }
>>
>> function checkIfDone() {
>>   if (IPython.notebook.kernel_busy) {
>> setTimeout(5000, function() {
>>   checkIfDone();
>> });
>>   } else {
>> console.log('Finished execution');
>>   }
>> }
>>
>> Is there a better way? Some other event to hook into?
>>
>> Thanks!
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jupyter+u...@googlegroups.com .
>> To post to this group, send email to jup...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jupyter/0982776e-ea36-447c-a45c-d6c75775cb3f%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/8f7d5e8e-bcb8-47cf-9616-386126f4bda6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] How does jupyter show dataframe as html table ?

2017-12-19 Thread Jeff Zhang
Just wondering how does jupyter do that ? Is there any display hook for 
that ? and how's that implemented. Thanks


-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/c1139ebd-9f0c-463d-97bf-8b8ad25435c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Where can I find materials for how to use IPython api

2017-12-19 Thread Jeff Zhang

Thanks Thomas, I'd like to embed ipython into some kind of notebook like 
jupyter. So I'd like to use Ipython advanced apis for capturing the output, 
code completion and etc. 

在 2017年12月19日星期二 UTC+8下午7:56:08,takowl写道:
>
> Hi Jeff,
>
> You could look at some IPython extensions to see how they use the API: 
> https://github.com/ipython/ipython/wiki/Extensions-Index .
>
> What sort of project are you planning to embed IPython into?
>
> Thomas
>
> On 19 December 2017 at 11:51, Jeff Zhang  
> wrote:
>
>>
>> I'd like to embed IPython in my project, so I would use the internal api 
>> of IPython. The only thing I can find for now is this link 
>> https://ipython.readthedocs.io/en/stable/
>> But what other materials that I can find for using IPython api.
>>
>>
>>  
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jupyter+u...@googlegroups.com .
>> To post to this group, send email to jup...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jupyter/7a4b41df-4dab-401e-9c2e-d3dd05e180a1%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/6972a613-6c64-401b-b56b-9e65fde619a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] how to test for running server?

2017-12-19 Thread Tim Harsch
Hi all,
I see with JupyterHub API you can POST or DELETE to  /users/{name}/server 
but there doesn't seem to be a GET.  If that's true is there another way I 
can test for a running server other than POST or DELETE which have their 
side effects?..

Thanks,
Tim

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/44649234-7620-4b79-8e5d-ed88d0071728%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] Re: Where can I find materials for how to use IPython api

2017-12-19 Thread Lawrence D’Oliveiro
On Wednesday, December 20, 2017 at 12:51:28 AM UTC+13, Jeff Zhang wrote:
>
>
> I'd like to embed IPython in my project, so I would use the internal api 
> of IPython. The only thing I can find for now is this link 
> https://ipython.readthedocs.io/en/stable/
> But what other materials that I can find for using IPython api.
>
 

>  Ones I have also found useful:

   - Rich output examples 
   

   - ipywidgets API ref 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/f8cc9558-8d84-4dc9-a46c-082963dac0d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Re: Working on a Common Lisp Jupyter notebook server - and experiencing a crash in ipython code

2017-12-19 Thread Thomas Kluyver
I think the design of ZMQ is that each thread should have its own socket.
But I don't know whether this would help with the issue you're seeing. And
there may be an extra complication because the kernel binds the sockets
(not connects), and I think only one socket can be bound to an endpoint at
once.

Thomas

On 19 December 2017 at 14:22, Christian Schafmeister <
drschafmeis...@gmail.com> wrote:

> Yes - this is how the pzmq (a Common Lisp wrapper library for the zmq
> library) works as well.
> Here is the code that I added the mutex to (it's Common Lisp but you
> should be able to read it):
>
> https://github.com/clasp-developers/cl-jupyter/blob/
> master/src/message.lisp#L300
>
> The calls to 'message-send' all pass the same sockets (iopub socket or
> shell socket) - so if multiple threads call 'message-send' at the same time
> there is nothing that distinguishes what thread is sending what parts.  By
> wrapping a mutex around the multiple pzmq:send calls it ensures that
> different threads don't call pzmq:send at the same time.
>
> I don't know how threading works in Python - maybe this isn't an issue in
> Python.
> In Common Lisp I'm using the C pthread library for threading and threads
> trample on each other if I don't take care like this.
>
>
>
> On Tuesday, December 19, 2017 at 7:37:12 AM UTC-5, takowl wrote:
>>
>> The Jupyter protocol relies on ZMQ 'multipart' messages. IIRC, a
>> multipart message is a series of individual messages with the SNDMORE flag
>> set on all but the last one. I don't know if those parts are meant to be
>> separated out again if two threads are sending parts interleaved to the
>> same endpoint.
>>
>> On 19 December 2017 at 12:28, Christian Schafmeister <
>> drschaf...@gmail.com> wrote:
>>
>>> I'm certain it's a problem on my kernel side, it has to do with sending
>>> messages to jupyter and not receiving them from jupyter.  The messages are
>>> send out using multiple calls to the pzmq:send function and when multiple
>>> threads were doing this at the same time the messages got garbled.  I
>>> wrapped the sending code in a mutex and the problem went away.
>>> I don't think it's a jupyter issue.
>>>
>>> On Tuesday, December 19, 2017 at 2:00:33 AM UTC-5, Roland Weber wrote:

 On Monday, December 18, 2017 at 3:00:23 PM UTC+1, Christian
 Schafmeister wrote:
>
> I fixed the problem last night - it turned out to be a threading issue.
> When I rapidly evaluated notebook cells (hitting shift-enter really
> fast) the Python in Jupyter Notebook would crash as shown.
> Multiple processes were calling the pzmq:send function at the same
> time and the messages were becoming interleaved and garbled.
> I wrapped a mutex around the function that calls pzmq:send multiple
> times and the problem went away.
>

 That sounds like a serious bug. Jupyter is supposed to handle
 simultaneous requests from multiple clients to the same kernel, afaik. This
 should not garble messages.

 Are you sure that the problem is on the sending side? Or could it be
 that your kernel expects messages in sequence, although the messaging
 protocol makes no guarantees about that? It's not impossible that you found
 a problem in Jupyter. But it seems strange that something so fundamental
 would have gone unnoticed until now.

 If you think that problem is in Jupyter, please open an issue and point
 us to the code where you had to implement the fix.

 best regards,
   Roland

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Project Jupyter" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jupyter+u...@googlegroups.com.
>>> To post to this group, send email to jup...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/jupyter/c190dae1-cf7d-43d8-99ec-943ca48ba71e%40googlegroups.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/657c9a40-4a61-421b-961b-2f36fa9cca93%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and 

Re: [jupyter] Re: Working on a Common Lisp Jupyter notebook server - and experiencing a crash in ipython code

2017-12-19 Thread Christian Schafmeister
Yes - this is how the pzmq (a Common Lisp wrapper library for the zmq 
library) works as well.
Here is the code that I added the mutex to (it's Common Lisp but you should 
be able to read it):

https://github.com/clasp-developers/cl-jupyter/blob/master/src/message.lisp#L300

The calls to 'message-send' all pass the same sockets (iopub socket or 
shell socket) - so if multiple threads call 'message-send' at the same time 
there is nothing that distinguishes what thread is sending what parts.  By 
wrapping a mutex around the multiple pzmq:send calls it ensures that 
different threads don't call pzmq:send at the same time.

I don't know how threading works in Python - maybe this isn't an issue in 
Python.
In Common Lisp I'm using the C pthread library for threading and threads 
trample on each other if I don't take care like this.



On Tuesday, December 19, 2017 at 7:37:12 AM UTC-5, takowl wrote:
>
> The Jupyter protocol relies on ZMQ 'multipart' messages. IIRC, a multipart 
> message is a series of individual messages with the SNDMORE flag set on all 
> but the last one. I don't know if those parts are meant to be separated out 
> again if two threads are sending parts interleaved to the same endpoint.
>
> On 19 December 2017 at 12:28, Christian Schafmeister  > wrote:
>
>> I'm certain it's a problem on my kernel side, it has to do with sending 
>> messages to jupyter and not receiving them from jupyter.  The messages are 
>> send out using multiple calls to the pzmq:send function and when multiple 
>> threads were doing this at the same time the messages got garbled.  I 
>> wrapped the sending code in a mutex and the problem went away.
>> I don't think it's a jupyter issue.
>>
>> On Tuesday, December 19, 2017 at 2:00:33 AM UTC-5, Roland Weber wrote:
>>>
>>> On Monday, December 18, 2017 at 3:00:23 PM UTC+1, Christian Schafmeister 
>>> wrote:

 I fixed the problem last night - it turned out to be a threading issue.
 When I rapidly evaluated notebook cells (hitting shift-enter really 
 fast) the Python in Jupyter Notebook would crash as shown.
 Multiple processes were calling the pzmq:send function at the same time 
 and the messages were becoming interleaved and garbled.
 I wrapped a mutex around the function that calls pzmq:send multiple 
 times and the problem went away.

>>>
>>> That sounds like a serious bug. Jupyter is supposed to handle 
>>> simultaneous requests from multiple clients to the same kernel, afaik. This 
>>> should not garble messages.
>>>
>>> Are you sure that the problem is on the sending side? Or could it be 
>>> that your kernel expects messages in sequence, although the messaging 
>>> protocol makes no guarantees about that? It's not impossible that you found 
>>> a problem in Jupyter. But it seems strange that something so fundamental 
>>> would have gone unnoticed until now.
>>>
>>> If you think that problem is in Jupyter, please open an issue and point 
>>> us to the code where you had to implement the fix.
>>>
>>> best regards,
>>>   Roland
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jupyter+u...@googlegroups.com .
>> To post to this group, send email to jup...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jupyter/c190dae1-cf7d-43d8-99ec-943ca48ba71e%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/657c9a40-4a61-421b-961b-2f36fa9cca93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Re: Working on a Common Lisp Jupyter notebook server - and experiencing a crash in ipython code

2017-12-19 Thread Thomas Kluyver
The Jupyter protocol relies on ZMQ 'multipart' messages. IIRC, a multipart
message is a series of individual messages with the SNDMORE flag set on all
but the last one. I don't know if those parts are meant to be separated out
again if two threads are sending parts interleaved to the same endpoint.

On 19 December 2017 at 12:28, Christian Schafmeister <
drschafmeis...@gmail.com> wrote:

> I'm certain it's a problem on my kernel side, it has to do with sending
> messages to jupyter and not receiving them from jupyter.  The messages are
> send out using multiple calls to the pzmq:send function and when multiple
> threads were doing this at the same time the messages got garbled.  I
> wrapped the sending code in a mutex and the problem went away.
> I don't think it's a jupyter issue.
>
> On Tuesday, December 19, 2017 at 2:00:33 AM UTC-5, Roland Weber wrote:
>>
>> On Monday, December 18, 2017 at 3:00:23 PM UTC+1, Christian Schafmeister
>> wrote:
>>>
>>> I fixed the problem last night - it turned out to be a threading issue.
>>> When I rapidly evaluated notebook cells (hitting shift-enter really
>>> fast) the Python in Jupyter Notebook would crash as shown.
>>> Multiple processes were calling the pzmq:send function at the same time
>>> and the messages were becoming interleaved and garbled.
>>> I wrapped a mutex around the function that calls pzmq:send multiple
>>> times and the problem went away.
>>>
>>
>> That sounds like a serious bug. Jupyter is supposed to handle
>> simultaneous requests from multiple clients to the same kernel, afaik. This
>> should not garble messages.
>>
>> Are you sure that the problem is on the sending side? Or could it be that
>> your kernel expects messages in sequence, although the messaging protocol
>> makes no guarantees about that? It's not impossible that you found a
>> problem in Jupyter. But it seems strange that something so fundamental
>> would have gone unnoticed until now.
>>
>> If you think that problem is in Jupyter, please open an issue and point
>> us to the code where you had to implement the fix.
>>
>> best regards,
>>   Roland
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/c190dae1-cf7d-43d8-99ec-943ca48ba71e%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOvn4qiBRq1v81XB_2RktDDk_t--9jC%3DW-pHoq6%3DF18qvtk1rg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Binary vs text websocket frames

2017-12-19 Thread Christian Schafmeister
Thank you very much!
Our messages appear to always add a "buffers" field even when the list of 
buffers is empty.  I'll fix that.


On Monday, December 18, 2017 at 1:17:35 PM UTC-5, Jason Grout wrote:
>
> The websocket frames are sent in either binary or text, depending on 
> whether there are binary buffers encoded in the message (it is a 
> per-message decision, not an overall decision). The decision logic is here: 
> https://github.com/jupyter/notebook/blob/ca50f1af5afb525fd95b98b2e61e69db28094467/notebook/base/zmqhandlers.py#L230
>
> I think it would be very useful to have either something that can log the 
> messages in the kernel, right around that logic. Another interesting change 
> would be to have a debug switch in the notebook server that encodes any 
> binary message buffers with base64 so the websocket message can still be a 
> text websocket frame. Another place to put the logging logic is in the 
> frontend, after the message has been converted back into a native js object.
>
> Jason
>
>
> On Mon, Dec 18, 2017 at 6:23 AM Christian Schafmeister <
> drschaf...@gmail.com > wrote:
>
>> Hello,
>>
>> How can I control whether the jupyter server sends binary websocket 
>> frames vs text websocket frames to the browser?
>>
>> When monitoring websocket traffic between an ipython jupyter notebook 
>> kernel and the browser, all websocket frames, both to the browser and from 
>> the browser are in websocket text frames.  This makes it easy to read the 
>> JSON dictionaries using almost any browser.
>> When monitoring websocket traffic between our Common Lisp kernel and a 
>> browser, the websocket frames to the browser are binary websocket frames 
>> and the frames from the browser are websocket text frames. 
>> I recently learned that it is the jupyter notebook server (written in 
>> python) that is interposed between our kernel and the browser that is 
>> carrying out this websocket communication.  Why is it using binary frames?  
>> Binary websocket frames are a lot harder to dig into and extract the JSON 
>> from.
>>
>> I'd like to monitor the websocket traffic between the jupyter server and 
>> the browser for debugging.
>> It has been extremely helpful to do this in a painful/limited way to add 
>> jupyter widgets support to our kernel (based on cl-jupyter/Common Lisp).
>>
>> Best,
>>
>> Christian Schafmeister
>> Professor
>> Chemistry Department
>> Temple University
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jupyter+u...@googlegroups.com .
>> To post to this group, send email to jup...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jupyter/9915a01a-5704-4671-86ce-5c33793504ee%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/4af64054-cede-478d-89a9-28fe4ca8a6c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] Re: Working on a Common Lisp Jupyter notebook server - and experiencing a crash in ipython code

2017-12-19 Thread Christian Schafmeister
I'm certain it's a problem on my kernel side, it has to do with sending 
messages to jupyter and not receiving them from jupyter.  The messages are 
send out using multiple calls to the pzmq:send function and when multiple 
threads were doing this at the same time the messages got garbled.  I 
wrapped the sending code in a mutex and the problem went away.
I don't think it's a jupyter issue.

On Tuesday, December 19, 2017 at 2:00:33 AM UTC-5, Roland Weber wrote:
>
> On Monday, December 18, 2017 at 3:00:23 PM UTC+1, Christian Schafmeister 
> wrote:
>>
>> I fixed the problem last night - it turned out to be a threading issue.
>> When I rapidly evaluated notebook cells (hitting shift-enter really fast) 
>> the Python in Jupyter Notebook would crash as shown.
>> Multiple processes were calling the pzmq:send function at the same time 
>> and the messages were becoming interleaved and garbled.
>> I wrapped a mutex around the function that calls pzmq:send multiple times 
>> and the problem went away.
>>
>
> That sounds like a serious bug. Jupyter is supposed to handle simultaneous 
> requests from multiple clients to the same kernel, afaik. This should not 
> garble messages.
>
> Are you sure that the problem is on the sending side? Or could it be that 
> your kernel expects messages in sequence, although the messaging protocol 
> makes no guarantees about that? It's not impossible that you found a 
> problem in Jupyter. But it seems strange that something so fundamental 
> would have gone unnoticed until now.
>
> If you think that problem is in Jupyter, please open an issue and point us 
> to the code where you had to implement the fix.
>
> best regards,
>   Roland
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/c190dae1-cf7d-43d8-99ec-943ca48ba71e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Where can I find materials for how to use IPython api

2017-12-19 Thread Thomas Kluyver
Hi Jeff,

You could look at some IPython extensions to see how they use the API:
https://github.com/ipython/ipython/wiki/Extensions-Index .

What sort of project are you planning to embed IPython into?

Thomas

On 19 December 2017 at 11:51, Jeff Zhang  wrote:

>
> I'd like to embed IPython in my project, so I would use the internal api
> of IPython. The only thing I can find for now is this link
> https://ipython.readthedocs.io/en/stable/
> But what other materials that I can find for using IPython api.
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/7a4b41df-4dab-401e-9c2e-d3dd05e180a1%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOvn4qioLZQ8OeLdBEWj1GWpEsxymr-9oPFw3Gajn-wLGxwtNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] Where can I find materials for how to use IPython api

2017-12-19 Thread Jeff Zhang

I'd like to embed IPython in my project, so I would use the internal api of 
IPython. The only thing I can find for now is this 
link https://ipython.readthedocs.io/en/stable/
But what other materials that I can find for using IPython api.


 

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/7a4b41df-4dab-401e-9c2e-d3dd05e180a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.