homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients eryksun, fdrake, rhettinger, serhiy.storchaka
Date 2017年04月05日.22:07:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1491430024.07.0.206487024267.issue29996@psf.upfronthosting.co.za>
In-reply-to
Content
> Though I don't have any idea if it works on Windows, but it seems 
> properly factored.
Generally it should. However, os.get_terminal_size is unnecessarily limited to the standard handles with a hard-coded mapping 0 => StandardInput, 1 => StandardOutput, and 2 => StandardError, and otherwise raises ValueError. Example failure:
 >>> fd = os.open('conout$', os.O_RDWR)
 >>> os.isatty(fd)
 True
 >>> os.get_terminal_size(fd)
 Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 ValueError: bad file descriptor
There is no need to involve the standard handles. It should call _get_osfhandle(fd).
History
Date User Action Args
2021年03月20日 07:38:49eryksununlinkissue29996 messages
2017年04月05日 22:07:04eryksunsetrecipients: + eryksun, fdrake, rhettinger, serhiy.storchaka
2017年04月05日 22:07:04eryksunsetmessageid: <1491430024.07.0.206487024267.issue29996@psf.upfronthosting.co.za>
2017年04月05日 22:07:04eryksunlinkissue29996 messages
2017年04月05日 22:07:04eryksuncreate

AltStyle によって変換されたページ (->オリジナル) /