diff --git a/colorama/ansitowin32.py b/colorama/ansitowin32.py index abf209e6..4a1769e7 100644 --- a/colorama/ansitowin32.py +++ b/colorama/ansitowin32.py @@ -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: