Hi all,

I know a number of us use PyCharm/Eclipse for Django development.  As such 
the interpreters run `./manage.py runserver` directly from within the IDE. 
 The problem is that when using this approach sys.stdout does not have the 
method `isatty()`.  attached to is.  This results in no color for PyCharm / 
Eclipse people.  There are a number of ways to support this but the 
simplest and most scalable IMHO is to be able to override this with a 
settings option to force color.  Is this cool to put a feature request in, 
and what's the probability of it happening?

---- django.core.management.color.py ---

*from django.conf import settings*

def supports_color():
    """
    Returns True if the running system's terminal supports color, and False
    otherwise.
    """
    unsupported_platform = (sys.platform in ('win32', 'Pocket PC'))
    # isatty is not always implemented, #6223.
    ## is_a_tty = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty()
*    is_a_tty = (hasattr(sys.stdout, 'isatty') and sys.stdout.isatty()) \*
*      or settings.SUPPORTS_COLOR*
    if unsupported_platform or not is_a_tty:
        return False
    return True

Thanks

---

Steven Klass

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-developers/-/-NL44J422mAJ.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to