New submission from Cosimo Lupo:
the `_pyio` module at line 16 tries to check whether it is running on Windows
platform, by doing:
```
if os.name == 'win32':
from msvcrt import setmode as _setmode
else:
_setmode = None
```
However, the string returned by os.name is 'nt' and not 'win32' (the latter is
returned by `sys.platform`). Therefore, the value is always False and the
setmode function from mscvrt module is never imported.
Thank you.
Cheers,
Cosimo
----------
components: IO
messages: 248728
nosy: Cosimo Lupo
priority: normal
severity: normal
status: open
title: _pyio checks that `os.name == 'win32'` instead of 'nt'
type: behavior
versions: Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24881>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com