-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Make the isatty method of OutStream return True #683
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me, thank you! I'll leave this open until Monday in case another maintainer knows of a reason not to enable this.
Although this would be quite useful to support Rich and Colorama in Spyder and the notebook, I don't know if it could have side effects on IPython's display system. I mean, there should be a reason why the @minrk, @takluyver, @Carreau, what do you think? |
I think this is a bad idea. A lot of things assume that Things like pagers ( less, more) and many others will start to misbehave if you set tty to true. |
Thanks for the input @Carreau! What if we make this change configurable then? That way, users that know what they are doing could enable this functionality for Rich and Colorama. In Spyder we could also expose this option in our Preferences system and inform users to activate it if we detect they are working with those libraries. |
It is too bad that there is a single flag that signals if an output can handle simple line control (like backspace), colors, and full cursor movements. We have a commercial product and almost 100% of the non-interactive output works well when istty() returns True. |
No objections to making in configurable..I believe there might be something
like terminal/termcap that should let us hurry more in depth which
capabilities the terminal has, but I don't think it's standard or has
python binding.
…On Mon, Jun 7, 2021, 20:24 Doug Blank ***@***.***> wrote:
It is too bad that there is a single flag that signals if an output can
handle simple line control (like backspace), colors, and full cursor
movements. We have a commercial product and almost 100% of the
non-interactive output works well when istty() returns True.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#683 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACR5T4VTLYPONL2IFBAE3TTRUFFBANCNFSM46DMXVIQ>
.
|
Agreed, that sounds like a good approach! |
@dsblank @Carreau @blink1073 @ccordoba12 I will make the option configurable, so that projects using the The only remaining question is what the default value will be for this option. The safe option would be |
It needs to be False to be on the safe side and not to change the current behavior. |
@blink1073 The additional commits are under another github account. Could you approve the CI? |
Done! |
Looks like tests need updating again |
The linter flagged one thing: https://github.com/ipython/ipykernel/pull/683/checks?check_run_id=2777466679#step:8:21 |
@blink1073 Thanks, I fixed the formatting. |
Thanks for the contribution @peendebak! |
The
ipykernel.iostream.OutStream
represents an interactive stream and should there have aisatty
method returningTrue
.Also see #268, #680, Textualize/rich#1221
Fixes #680
Fixes #268