Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#1762 closed defect (fixed)

tiny nit in core/ prevents import in python win ide

Reported by: ross.lazarus@… Owned by: adrian
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I'm working on some django automation :-)

While working with a python IDE under windows, I noticed that I could not import the 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\", line 49, in ?
    if (not sys.stdout.isatty()) or (sys.platform == 'win32'):
  File "C:\Python24\Lib\site-packages\pythonwin\pywin\mfc\", 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:

    if (not sys.stdout.isatty()) or (sys.platform == 'win32'):

Harmless enough I think?

Change History (1)

comment:1 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [2845]) Fixed #1762 -- Fixed Windows error in Thanks, ross.lazarus@…

Note: See TracTickets for help on using tickets.
Back to Top