[New-bugs-announce] [issue6082] os.path.sameopenfile reports that standard streams are the same

Ryan Leslie report at bugs.python.org
Fri May 22 02:56:49 CEST 2009


New submission from Ryan Leslie <rylesny at gmail.com>:

Python 2.6.1 (r261:67515, Apr  2 2009, 18:25:55)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, os
>>> os.path.sameopenfile(sys.stdin.fileno(), sys.stdout.fileno())
True
>>> os.path.sameopenfile(sys.stdout.fileno(), sys.stderr.fileno())
True
>>> null = open(os.devnull)
>>> os.path.sameopenfile(sys.stdin.fileno(), null.fileno())
False
>>> # That worked.

----------
components: Library (Lib)
messages: 88174
nosy: ryles
severity: normal
status: open
title: os.path.sameopenfile reports that standard streams are the same
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6082>
_______________________________________


More information about the New-bugs-announce mailing list