PyCharm - color output in django console

The problem is that when I use the dev server through the Kubuntu Konsole application, the debug output is colored: Konsole.png

But if I run it through the built-in "Run" or "Debug" in PyCharm, the output in the PyCharm console will be red: PyCharm.png

Is there a way to draw output in PyCharm in color? Because I can not find anything related in the settings.

UPD: link to PyCharm issue tracking question

As I can see, some people are thinking about this issue, and here is the link to this problem on the PyCharm tracker - youtrack.jetbrains.com/issue/PY-19790 . If you vote for this feature, it will be released faster!

+6
source share
2

, PyCharm , ( ).

PyCharm - ( ).

PyCharm (. , ), . .

, /, , .

PyCharm bug tracker; , .

0

, . , . BSD

:

try:  # Colored logger CaaS. Auto downloaded and verified.
    import os
    import hashlib
    from urllib import request
    url, sha256 = "https://lab.it.hs-hannover.de/lukyanch/pydevutils/raw/c531eaf7/colored_logger.py", "083e1a39cfdbe17a7126188b5477fb8f324be8106a39ed4a00faeb3f18c5aedc"
    cached_file = "/tmp/{0}.py".format(sha256)
    code = bool(os.path.exists(cached_file) or [request.urlretrieve(url, cached_file), print("Downloaded: " + url)]) and open(cached_file, "r").read()
    assert hashlib.sha256(code.encode()).hexdigest() == sha256, os.remove(cached_file) or "Bad content: " + cached_file
    exec(code)
except Exception as e:
    print("No colored logger: {e.__class__.__name__}: {e}".format(e=e))

enter image description here

0

All Articles