2.0.2 • Published 9 years ago

jupyter-kernel-watch v2.0.2

Weekly downloads
1
License
BSD
Repository
github
Last release
9 years ago

jupyter-kernel-watch

Watches jupyter kernel directories for you.

NPM

| Travis

var KernelWatch = require('jupyter-kernel-watch')
var watcher = KernelWatch(['/path/to/kernels', '/another/path/to/.jupyter/kernels'])

watcher.on('data', function (kernelSpecs) {
  // kernelSpecs is a list of the contents of the kernel.json as a JSON object
  // e.g. [
  // {
  //   "filepath": "/path/to/kernels/python/kernel.json",
  //   "data": { "display_name": "Python 2", "language": "python", "argv": [ etc...]}
  //  }
  // ]
  //
})

watcher.close()

API

KernelWatch(dirs)

Returns a watcher

dirs: the directories to watch

watcher.close()

Closes the watcher -- stops watching the filesystem.

Events

There should be more, but right now it just emits one event -- that's when the kernel spec (kernel.json) has changed.

kernelspecs

watcher.on('data', function (kernelSpecs) {
  // list of kernelspecs
})
2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago