-
Notifications
You must be signed in to change notification settings - Fork 200
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
The standard streams' method isatty()
should return True
.
#486
Comments
isatty()
should return True
.isatty()
should return True
.
QtConsole is not a full terminal (TTY emulator), and doesn't support all ANSI codes. Then again, it certainly is an interactive stream. |
@real-yfprojects, thanks for reporting. Please open this issue in the ipykernel repo because we can't solve it here and a change as the one you're suggesting will also affect the Jupyter notebook and JupyterLab. |
@ccordoba12 |
Qtconsole is only a frontend for the kernel, so it doesn't directly handle anything related to it. But if you think you can easily subclass |
@ccordoba12 @wmvanvliet The For |
@peendebak, you need to pass a different That means that for this to work it's required to subclass IPKernelApp and the kernel itself. Fortunately, that's what we do in Spyder already with our |
@ccordoba12 I created spyder-ide/spyder-kernels#302. Could you give instructions there? |
Current behaviour:
In my opinion this should return
True
.A stream's method
isatty
shouldI think that means whether it is an interactive console.
This is especially important when working with
colorama
. This python module for terminal colouring checks this method's return value to decide whether to strip ANSI codes or not.In the current state the qtconsole lacks colorama support.
It seems like the standard output and error streams are of type
ipykernel.iostream.OutStream
in the qtconsole. The issue might actually lie there.I think this class directly inherits
isatty()
fromio.TextIoBase
which isn't an 'interactive' stream by default.The text was updated successfully, but these errors were encountered: