diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-11-14 22:22:56 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2023-11-15 00:00:56 +0300 |
commit | 864f19750c3b58c8c09cfd57ef7622f6bdd38b04 (patch) | |
tree | 22714f55194144cd0be9cd4c9e0f29eb0ddb638a /README.md | |
parent | 93596df1755400c3eac5686668fd4a5d5728b474 (diff) | |
download | applause2-864f19750c3b58c8c09cfd57ef7622f6bdd38b04.tar.gz |
Jupyter integration improvements: support $APPLAUSE_OPTS and document how to display graphics and rich text
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -85,7 +85,7 @@ git clone https://github.com/guysv/ilua.git --recurse-submodules cd ilua python3 -m venv env . env/bin/activate -pip install twisted==22.10.0 ilua +pip install twisted==22.10.0 . ``` You can now directly run an Applause Jupyter Console session: @@ -96,10 +96,11 @@ ilua --lua-interpreter=./applause ``` In order to tweak Applause command line parameters and be independant of the execution directory, use -the included wrapper script: +the included wrapper script. +It also allows passing in additional arguments to Applause, e.g.: ``` -ilua --lua-interpreter=./ilua-wrapper.sh +APPLAUSE_OPTS="-o 2" ilua --lua-interpreter=./ilua-wrapper.sh ``` You can symlink this to `lua` in the Python environment to make Applause the default @@ -118,19 +119,19 @@ pip install notebook Now launch a web server and follow the onscreen instructions: ``` -jupyter notebook +APPLAUSE_OPTS="-o 2" jupyter notebook --MultiKernelManager.default_kernel_name=lua ``` -In the Jupyter Notebook dashboard, when creating a new notebook, you will be asked to select the kernel. -If you choose Lua, this will in fact launch Applause (assuming that you symlinked to `lua` -as described above). +This works assuming that you symlinked `ilua-wrapper.sh` to `lua` as described above. An alternative might be to create a custom Jupyter kernel configuration (kernel.json). Please note the following restrictions/bugs: * You cannot publicly host the Jupyter Notebook as the sound is generated on the host machine. -* You cannot currently interrupt an endlessly running stream without restarting the kernel (**FIXME**) +* You cannot currently interrupt an endlessly running stream without restarting the kernel + (see this [ILua bug](https://github.com/guysv/ilua/issues/1)). * ILua does not work well with our custom Stream:tostring() metamethods * The output of other functions like Stream:toplot() is garbled. -* You cannot currently output rich text or graphics - (it would be really cool if we could display SVG generated by gnuplot in notebook cells for instance). +* You cannot currently output rich text or graphics - + it would be really cool if we could display SVG generated by gnuplot in notebook cells for instance. + There is a [workaround](https://github.com/guysv/ilua/issues/5), though. |