These are chat archives for ipython/ipython

10th
Dec 2015
Brendon McLean
@brendon9x
Dec 10 2015 10:27
Good morning/evening as appropriate. I am trying to upgrade a custom kernel from IPython 2 to Jupyter using the new kernel spec format. It has mostly been plain sailing, but it is unclear to me what is the correct way to load custom JS. I used to put it in a profile dir subdirectory called static. Looking at the IRuby Kernel, it has a kernel.js and kernel.css file. If I import css from kernel css, then the load path is 'kernelspecs/...', but if I try and add JS, it is prefixed with '/static/...'
I think I can probably hack this to work, but was wondering what opinions, assumptions and consideration are baked into the system so I can try and make something less brittle.
Brendon McLean
@brendon9x
Dec 10 2015 14:25
I am working around it using absolute path requires '/kernelspecs/my_kernel/blah.js'
Min RK
@minrk
Dec 10 2015 23:19
@brendon9x if there is a kernel.js file in your kernelspec, it will be loaded automatically.