[issue6082] os.path.sameopenfile reports that standard streams are the same

2009-05-21 Thread Ryan Leslie

New submission from Ryan Leslie ryle...@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 rep...@bugs.python.org
http://bugs.python.org/issue6082
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6082] os.path.sameopenfile reports that standard streams are the same

2009-05-21 Thread Philip Jenvey

Philip Jenvey pjen...@users.sourceforge.net added the comment:

They are the same file, namely your tty

Python 2.6 (r26:66714, Oct  8 2008, 22:16:30) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type help, copyright, credits or license for more information.
 import os, sys
 [os.ttyname(fp.fileno()) for fp in sys.stdin, sys.stdout, sys.stderr]
['/dev/ttys002', '/dev/ttys002', '/dev/ttys002']

--
nosy: +pjenvey

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6082
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6082] os.path.sameopenfile reports that standard streams are the same

2009-05-21 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6082
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6082] os.path.sameopenfile reports that standard streams are the same

2009-05-21 Thread Ryan Leslie

Ryan Leslie ryle...@gmail.com added the comment:

Thanks for the quick response, Philip. Makes even more sense now that I see:

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.
 open('/dev/stdout').readline()
hello
'hello\n'
 open('/dev/stdin').readline()
hello
'hello\n'


--
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6082
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6082] os.path.sameopenfile reports that standard streams are the same

2009-05-21 Thread Ryan Leslie

Changes by Ryan Leslie ryle...@gmail.com:


--
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6082
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com