Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
BenRussert committed Aug 12, 2018
1 parent 51e896a commit 6b51251
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Spawnteract

[![Greenkeeper badge](https://badges.greenkeeper.io/nteract/spawnteract.svg)](https://greenkeeper.io/)

Spawn yourself a Jupyter kernel backend.

```
Expand All @@ -24,13 +22,26 @@ spawnteract.launch('python3').then(kernel => {
})
```

You'll need to close `kernel.spawn` yourself as well as delete `kernel.connectionFile` from disk when finished:
`spawnteract` will automatically delete the connection file after the kernel
process exits or errors out.

To disable this feature, set `cleanupConnectionFile` to `false` in the `spawnOptions`:

```js
launch(kernelName, { cleanupConnectionFile: false });
```

You'll should close `kernel.spawn` when a user shuts down the kernel. If you disabled automatic cleanup, you will need to delete `kernel.connectionFile` from disk when finished:

```js
function cleanup(kernel) {
kernel.spawn.kill();
// Only do this second part if you opted out of automatic cleanup:
fs.unlink(kernel.connectionFile);
}
```

*For more info, see our [changelog](https://github.com/nteract/spawnteract/blob/master/CHANGELOG.md)
or open an issue with questions*

You will probably end up wanting to use this with [enchannel-zmq-backend](https://github.com/nteract/enchannel-zmq-backend).

0 comments on commit 6b51251

Please sign in to comment.