[IPython-dev] Cool cool, those pointers got things working better

Matthias BUSSONNIER bussonniermatthias at gmail.com
Fri Oct 18 10:54:52 EDT 2013

Le 18 oct. 2013 à 16:24, Joshua Donnelly a écrit :

> the change from 
> c.KernelManager.kernel_cmd 
> (rather than .kernel_launch_program) made it work a little more now, 
> so now the notebook starts without errors :)
> though when i interact with a cell, a modal dialog repeatedly says... 
> __________________________________________________________
> Kernel Restarting
> The kernel appears to have died. It will restart automatically.
> __________________________________________________________

Do you have error in the console ? 
Probably bad node version, of required packages.

> i guess that's the javascript 'working', so 
> would there be a good set of notebooks documenting the ipython internals
> or the notebook UI itself? because i don't know what you mean by "profile_default" (contains: settings/history/the json for the connections/etc)

IPython store many profile in .ipython/profile_<profile-name>/  on unix at least. Most of the customization happened here, 
you can overwrite some of IPython file (that is what Min's profile_jskernel does) and have some configuration.

> if you put it in profile_default, then you should run $ ipython.exe notebook --profile=default
> ok (for the "in browser js kernel.js" ) it was at 
> "C:\Users\Administrator\.ipython\profile_default\static\js\kernel.js"
> should it go at?  
> C:\Users\Administrator\.ipython\profile_default\kernel.js (no)
> or C:\Users\Administrator\.ipython\profile_default\static\kernel.jswell (no) i tried it in all 3 places at once, which probably wouldn't hurt, and it did not work, so i emptied the cache... and tried it at 
> C:\A\Y\IPY\IPython\html\static\services\kernels\js\kernel.js
> and it WORKS there, so that's good, So it's meant to be a drop
> in replacement for that existing file which makes sense since it's
> not linked in any other way. 

Ok, that's good. Anaconda might be doing some weird stuff. 
> So for those following along: https://github.com/minrk/profile_jskernel/blob/master/static/js/kernel.js -- just right click that and SaveAs your version of... 
> C:\A\Y\IPY\IPython\html\static\services\kernels\js\kernel.js
> (maybe keep a copy of "kernelORIGINAL.js" to revet back to)
> I thought the ipythonblocks_demo was pretty cool,
> lots of good stuff there
> I agree that it is **much** more painful if the field does not exist as you alway have to check for its existence. -- but when you loop thru the whole lot for the first render the missing properties could be added 
> if(!blah.metadata){blah.metadata={}} 
> then when it as it is saved back 
> if(JSON.stringify(blah.metadata)=='{}'){delete blah.metadata} 

The problem is that other languages might want to **read** the file. 

> or the python equivalent (a couple of lines to save millions of meaningless artifacts being written out to the web is a good thing). Also, I reckon the UNnecessary double quotes are evil ~ if it's mainly just going from python to the browser and you control the codebase, just pull them out, it would also encourage the use of a jsonp wrapper around the notebooks, because only jsonp and eval and not JSON.parse would work in that case, and jsonp has some serious advantages in terms of getting to you data online or offline with or without a server, over http: or file: protocol, it would be like a tripple win)

But we keep in mind those proposition. 
Would you like to open features requests on github with each of theses issue. 
When the notebook format changes, we can consider it and decide with the all core team, and people affected.

> WARNING:root:404 PUT /notebooks/0301f8f7-a094-442c-aab4-f0aa74615529 ( Notebook does not exist: 0301f8f7-a094-442c-aab4-f0aa74615529
> WARNING:root:404 PUT /notebooks/0301f8f7-a094-442c-aab4-f0aa74615529 ( 3.00ms
> wonder what it's doing there, trying to access something that isn't there

Which browser  Does it generate thumbnail of websites ? 
If so it's probably an old notebook as UUID are not kept across server restart. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131018/e87b9085/attachment.html>

More information about the IPython-dev mailing list