﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1762	tiny nit in core/management.py prevents import in python win ide	ross.lazarus@…	Adrian Holovaty	"I'm working on some django automation :-)

While working with a python IDE under windows, I noticed that I could not import the core.management module :-(

{{{
>>> from django.core import management
Traceback (most recent call last):
  File ""<interactive input>"", line 1, in ?
  File ""C:\Python24\lib\site-packages\django-0.91-py2.4.egg\django\core\management.py"", line 49, in ?
    if (not sys.stdout.isatty()) or (sys.platform == 'win32'):
  File ""C:\Python24\Lib\site-packages\pythonwin\pywin\mfc\object.py"", line 18, in __getattr__
    return getattr(o, attr)
AttributeError: isatty

}}}


Easily fixed by wrapping that failed test in a try except at line 50 or so:

{{{

try:
    if (not sys.stdout.isatty()) or (sys.platform == 'win32'):
        disable_termcolors()
except:
        pass
}}}


Harmless enough I think?"	defect	closed	Core (Other)		normal	fixed			Unreviewed	0	0	0	0	0	0
