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?