New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow default Console parameters to be configured with environment variables #2122
Conversation
I'm not keen on adding env vars that aren't already a standard. As a library, Rich shouldn't impose its own env vars on to applications. It should be the application author that decides how to handle env vars. |
Codecov Report
@@ Coverage Diff @@
## master #2122 +/- ##
=======================================
Coverage 99.48% 99.48%
=======================================
Files 72 72
Lines 7334 7348 +14
=======================================
+ Hits 7296 7310 +14
Misses 38 38
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Fair enough. I see that Spyder had the same issue I am experiencing here: (In the link above you suggested adding a generic environment variable for exactly this purpose). Spyder managed to work around the issue by creating their own kernel wrapper around However, creating my own kernel isn't really an option for me with I could override the kernel's configuration when it is launched to add hooks that make the required changes to the kernel. But, the kernel does not necessarily run in the same python environment or interpreter, so this would require users to install an extra package which contains the hooks (not ideal). My other idea is that I suppose that I could simply search the text/plain output for terminal escape sequences and make a decision about what to render based on that. Do you have any other ideas? |
I've done some testing, and rendering the
I'm not sure how this should apply when |
@joouha I think I need to understand your use case a bit more. Would you be free for a video chat, next week perhaps? |
@willmcgugan Yes, I can do a video call. My e-mail is in my profile if you'd like to set something up. |
It would be nice to see this Implemented! Examples:
|
Closing. Assumed stale. |
Type of changes
Checklist
Description
This allows the default values of the
Console
parametersforce_jupyter
,force_terminal
&force_interactive
to be overridden by setting the environment variablesRICH_FORCE_JUPYTER
,RICH_FORCE_TERMINAL
&RICH_FORCE_INTERACTIVE
.Fixes issue #2119