You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the detection of Pycharm introduced in #107 / #108 / #163 has some false-positives -- it actually should only determine whether the current script's output is redirected to a Pycharm Console Windows. However, the environment variable used is inherited for any subprocess, causing output redirected to other tools (xxd here) to be skewed:
somewebserver.py parses output from coloredtool.py
coloredtool.py uses colorama.
In this scenario, I'd like to debug mytestsuite.py -- however, since it is running in Pycharm, coloredtool.py suddenly starts to output ANSI escapes in its stdout, and causes somewebserver.py to fail, which makes debugging any software like mytestsuite.py with any indirect dependencies to colorama rather hard. Even identifying the issue of this sudden and unexpected malfunction of the webserver can be quite time-consuming.
I'd suggest removing the detection of the PYCHARM_HOSTED variable -- I'm not sure if the Pycharm option is new; but PyCharm can optionally emulate a TTY if required, which causes os.isatty (on Ubuntu) to return true for stdin/stdout/stderr on the single TTY actually connected to Pycharm. This way, all other tools not connected directly to the Pycharm window can output unformatted text as expected; and users of colorama still can use formatting within Pycharm, if they change their run/debug configuration accordingly.
The text was updated successfully, but these errors were encountered:
The failure is caused by colorama package producing excessive output at the process
termination. The additional output leads to error when parsing json.
Details:
1. PyCQA/isort#1657
2. tartley/colorama#307
The failure is caused by colorama package producing excessive output at the
process termination. The additional output leads to error when parsing
json.
Details:
1. PyCQA/isort#1657
2. tartley/colorama#307
Hello,
the detection of Pycharm introduced in #107 / #108 / #163 has some false-positives -- it actually should only determine whether the current script's output is redirected to a Pycharm Console Windows. However, the environment variable used is inherited for any subprocess, causing output redirected to other tools (xxd here) to be skewed:
Given the following scenario:
In this scenario, I'd like to debug mytestsuite.py -- however, since it is running in Pycharm, coloredtool.py suddenly starts to output ANSI escapes in its stdout, and causes somewebserver.py to fail, which makes debugging any software like mytestsuite.py with any indirect dependencies to colorama rather hard. Even identifying the issue of this sudden and unexpected malfunction of the webserver can be quite time-consuming.
I'd suggest removing the detection of the PYCHARM_HOSTED variable -- I'm not sure if the Pycharm option is new; but PyCharm can optionally emulate a TTY if required, which causes os.isatty (on Ubuntu) to return true for stdin/stdout/stderr on the single TTY actually connected to Pycharm. This way, all other tools not connected directly to the Pycharm window can output unformatted text as expected; and users of colorama still can use formatting within Pycharm, if they change their run/debug configuration accordingly.
The text was updated successfully, but these errors were encountered: