Skip to content

Commit

Permalink
Prevent file stream from being incorrectly wrapped on Pycharm
Browse files Browse the repository at this point in the history
  • Loading branch information
Delgan committed May 17, 2018
1 parent e19cbb7 commit b009dea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions colorama/ansitowin32.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def is_stream_closed(stream):


def is_a_tty(stream):
if 'PYCHARM_HOSTED' in os.environ:
return True
if 'PYCHARM_HOSTED' in os.environ:
return stream is sys.__stdout__ or stream is sys.__stderr__
return (hasattr(stream, 'isatty') and stream.isatty())


Expand Down

0 comments on commit b009dea

Please sign in to comment.