Closed thisroot closed 7 years ago
There is a command flag for that: --ijs-hide-undefined
. To get a list of all the IJavascript flags, run: ijs --ijs-help
.
Thanks!
How it's use from jupyter notebook?
@thisroot Did you try to run ijs --ijs-hide-undefined
?
@n-riesco it sounds like the question is how to configure the kernel.json
to have this option so it comes up from the same notebook server as people use for Python.
@thisroot @rgbkrk
I'm using something like this to test Hydrogen:
"kernelspecs": {
"ijavascript": {
"spec": {
"display_name": "IJavascript",
"env": {},
"argv": [
"ijskernel",
"--hide-undefined",
"--protocol=5.0",
"{connection_file}"
],
"language": "javascript"
},
"resources_dir": "/home/user/lib/node_modules/ijavascript/images"
}
}
@thisroot run jupyter kernelspec list
. You'll see output like:
javascript /Users/kylek/Library/Jupyter/kernels/javascript
Edit /Users/kylek/Library/Jupyter/kernels/javascript/kernel.json
(append kernel.json
to the path above for the javascript entry).
{
"argv": [
"ijskernel",
"--hide-undefined",
"{connection_file}",
"--protocol=5.0"
],
"display_name": "Javascript (Node.js)",
"language": "javascript"
}
For what it's worth, I prefer hiding undefined by default as well.
@rgbkrk There shouldn't be any need for editing the kernel spec. This should happen automatically when you run ijs --ijs-hide-undefined
.
There are several open issues that have highlighted that the original purpose of ijs
as a wrapper around jupyter notebook
is dated and confusing.
To address this confusion and acknowledge the three main use-cases of IJavascript, I'm planning to introduce the commands ijsinstall
, ijsconsole
and ijsnotebook
.
I never run ijs
and never will -- I want to use the kernel on jupyter servers running remotely (where it gets orchestrated as jupyter notebook
). Kernels shouldn't have to run the server their own way -- they should work out of the box in jupyter, qtconsole, nteract, etc.
Hi, wonderful library, but it is very annoying 'undefined' output, is it possible to remove its?