Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions colorama/ansitowin32.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def isatty(self):
if 'PYCHARM_HOSTED' in os.environ:
if stream is not None and (stream is sys.__stdout__ or stream is sys.__stderr__):
return True
# Detect if we are running in a jupyter notebook which supports ANSI colors
elif "JPY_PARENT_PID" in os.environ:
return False
try:
stream_isatty = stream.isatty
except AttributeError:
Expand Down