Typically, the way you'd look for kernelspecs is across a series of directories which can differ from OS to installation, etc. For the purpose of jupyter-kernel-watch, this means receiving a list of directories like so:
Within each of those, is several kernel spec bundles:
~/Library/Jupyter/kernels$ ls
hy ir python2 test
~/Library/Jupyter/kernels$ ls *
hy:
kernel.js kernel.json logo-32x32.png logo-64x64.png
ir:
kernel.json logo-64x64.png
python2:
kernel.json logo-32x32.png logo-64x64.png
test:
kernel.json
~/Library/Jupyter/kernels$ cd ~/.ipython/kernels
~/.ipython/kernels$ ls
javascript scala-2.11
~/.ipython/kernels$ ls *
javascript:
kernel.json
scala-2.11:
kernel.json
What a given user wants at the start is every kernelspec available and then they'd like updates to know when there are more kernels. Same thing happens with the notebook server when the page is refreshed (though it's a call to a REST API rather than evented IO based on filesystem changes).
Typically, the way you'd look for kernelspecs is across a series of directories which can differ from OS to installation, etc. For the purpose of
jupyter-kernel-watch
, this means receiving a list of directories like so:Within each of those, is several kernel spec bundles:
What a given user wants at the start is every kernelspec available and then they'd like updates to know when there are more kernels. Same thing happens with the notebook server when the page is refreshed (though it's a call to a REST API rather than evented IO based on filesystem changes).