#31216: Support terminal color output on Windows via colorama -------------------------------------+------------------------------------- Reporter: MinchinWeb | Owner: nobody Type: Bug | Status: new Component: Core (Management | Version: master commands) | Severity: Normal | Resolution: Keywords: windows, color, | Triage Stage: colorama | Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Description changed by MinchinWeb:
Old description: > If colorama is installed (as on Windows), support colored terminal > output. > > There is a very old ticket (https://code.djangoproject.com/ticket/13476) > discussing how to support colorized terminal output on Windows. At the > time, ANSICON was chosen as a solution over `colorama`. However, the link > provided for ANSICON (http://adoxa.hostmyway.net/ansicon/) no longer > works, and, personally, I struggled to install it previously (it involved > messing around with DLL's and some fairly low level Windows > functionality). `colorama`, on the other hand, is a current Python > package that provides color on Windows by converting the ANSI cods to > Windows native color "codes"; on other platforms, it just passes through > the ANSI codes through. `colorama` is also very popular: for example, it > is vendored by `pip` > (https://github.com/pypa/pip/tree/master/src/pip/_vendor). > > What this change does is test to see if `colorama` is available, and > activate color (on Windows) if it is. It is not a hard dependency or even > added to the "install_requires" of `setup.py`. Personally, I would > support adding `coloram` as a dependency on Windows, but I wasn't sure > how much support there would be for that. > > No documentation changes have been added, although I think this would be > wise to mention in the installation instructions for Windows. No tests > have been added either, but I'm not really sure what to test directly. If > someone could point me to where to make those changes, I would be happy > to. > > Pull Request: https://github.com/django/django/pull/12387 New description: If colorama is installed (as on Windows), support colored terminal output. There is a very old ticket (https://code.djangoproject.com/ticket/13476) discussing how to support colorized terminal output on Windows. At the time, ANSICON was chosen as a solution over `colorama`. However, the link provided for ANSICON (http://adoxa.hostmyway.net/ansicon/) no longer works, and, personally, I struggled to install it previously (it involved messing around with DLL's and some fairly low level Windows functionality). `colorama`, on the other hand, is a current Python package that provides color on Windows by converting the ANSI cods to Windows native color "codes"; on other platforms, it just passes through the ANSI codes through. `colorama` is also very popular: for example, it is vendored by `pip` (https://github.com/pypa/pip/tree/master/src/pip/_vendor). What this change does is test to see if `colorama` is available, and activate color (on Windows) if it is. It is not a hard dependency or even added to the "install_requires" of `setup.py`. Personally, I would support adding `colorama` as a dependency on Windows, but I wasn't sure how much support there would be for that. No documentation changes have been added, although I think this would be wise to mention in the installation instructions for Windows. No tests have been added either, but I'm not really sure what to test directly. If someone could point me to where to make those changes, I would be happy to. Pull Request: https://github.com/django/django/pull/12387 -- -- Ticket URL: <https://code.djangoproject.com/ticket/31216#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.06f5df322da83ebdd712525439a30a8d%40djangoproject.com.