Antoine Pitrou <pit...@free.fr> added the comment:

> As for a test, I will happily write one, but what can I test? A string
> for fd 0 and None for fd -1 (or is there some os call I can make to
> find the largest fd so I can test fd+1)?

For fd 0, it should be a string if the fd is a tty.
(it should also point to a valid codec)
You can also try fd 42 (same, call isatty() on it).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14153>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to