almond-sh / almond

A Scala kernel for Jupyter
https://almond.sh
BSD 3-Clause "New" or "Revised" License
1.59k stars 239 forks source link

Add "quiet" interpreter param which controls mirroring stdout/stderr to console #1224

Closed vsevolodstep-db closed 1 year ago

vsevolodstep-db commented 1 year ago

What is changed

This PR introduces a new quiet interpreter parameter which controls mirroring stdout/stderr to console. This is similar to IPKernelApp.quiet parameter. It could be used to collect kernel's output and store it somewhere to make debugging things easier.

Another possible option to support this is to change the existing trapOutput flag from Boolean to String to support three modes: trap, mirror, default, but this would be a breaking change. I'm happy to go with that approach if you think that it's better to keep amount of flags low and you don't care that much about changing parameter name/type

How is it tested

Manually with jupyterlab New tests which capture console output and verify it