Closed joouha closed 2 years ago
What are you proposing?
I'm proposing that the some of the default parameters values for Console.__init__
should be configurable using environment variables
I got that, but what environment variables and what parameters?
I think it makes sense to be able to override the default behaviour of force_jupyter
, force_terminal
& force_interactive
.
The environment variables could be called "RICH_FORCE_JUPYTER", "RICH_FORCE_TERMINAL", etc.
I've made a PR: #2122
Hello,
I've "fixed" my original issue by implementing ipywidgets
support, and writing a HTML/CSS renderer for euporie, so rich
's output is now handled in the same way as it is in JupyterLab.
It feels like a bit of an overly-complex solution, but it now means that rich.live.Live
objects work without clearing the entire cell output, and that the HTML output of JupyterRenderable
s / JupyterMixin
s look good in the terminal.
So you can now do this:
Did I solve your problem?
Why not buy the devs a coffee to say thanks?
Hello,
When using
rich
ineuporie
(a terminal Jupyter notebook client),rich
detects that it is running in a Jupyter notebook and not running in a TTY, and so returns HTML output.However, you get a far superior experience when using
rich
ineuporie
by by setting the followingConsole
parameters:I'd like to be able to pre-configure
rich
to use these parameters by default when running ineuporie
.The Jupyter kernel in which
rich
runs is a separate process toeuporie
, but will almost always be a sub-process of it. This means that if the defaultConsole
parameters could be set using environment variables, this would allow me to pre-configurerich
to give the best user experience when used ineuporie
.I'm happy to take stab at implementing this.
Let me know your thoughts, Thanks