2.0.4 • Published 3 years ago
jupyter-paths v2.0.4
jupyter-paths
Pure JavaScript implementation of jupyter-paths
.
npm install jupyter-paths
Usage
$ node
> var jp = require('jupyter-paths')
runtimeDir()
Returns immediately with the path to running kernels
> jp.runtimeDir()
'/Users/rgbkrk/Library/Jupyter/runtime'
dataDirs()
> jp.dataDirs()
[ '/Users/rgbkrk/Library/Jupyter',
'/usr/share/jupyter',
'/usr/local/share/jupyter' ]
If you want the paths to include the sys.prefix
paths (for Anaconda installs),
an optional opts
parameter is accepted with key withSysPrefix
. This changes
the return to a promise for you instead.
> jp.dataDirs({ withSysPrefix: true })
Promise { <pending> }
> jp.dataDirs({ withSysPrefix: true }).then(console.log)
Promise { <pending> }
> [ '/Users/rgbkrk/Library/Jupyter',
'/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/share/jupyter',
'/usr/share/jupyter',
'/usr/local/share/jupyter' ]
configDirs()
Like dataDirs
, an optional opts
parameter is accepted with key
withSysPrefix
as an argument.
> jp.configDirs({ withSysPrefix: true }).then(console.log)
Promise { <pending> }
> [ '/Users/rgbkrk/.jupyter',
'/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/etc/jupyter',
'/usr/local/etc/jupyter',
'/etc/jupyter' ]
2.0.4
3 years ago
2.0.3
4 years ago
2.0.2
4 years ago
2.0.1
4 years ago
2.0.0
7 years ago
1.1.0
7 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago
0.3.5
8 years ago
0.3.4
8 years ago
0.3.3
9 years ago
0.3.2
9 years ago
0.3.1
9 years ago
0.3.0
9 years ago
0.2.0
9 years ago
0.1.0
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago