Ned Deily added the comment:
An update: the problem with OS X behavior appears to have been fixed between OS
X 10.6 and 10.7. As of 10.7, print to a read-only file also fails as on linux:
print f, Hi
Traceback (most recent call last):
File stdin, line 1, in module
IOError: [Errno 9] Bad file descriptor
Also, f.write() as of 2.7.3 produces a more meaningful message.
f.write(bha)
Traceback (most recent call last):
File stdin, line 1, in module
IOError: File not open for writing
Since the original example now produces an exception, plus, as noted, this is
not an issue for 3.x and it's not likely that further work will be done on 2.x
in this area, I'm closing this as out-of-date.
--
nosy: -BreamoreBoy
resolution: - out of date
stage: test needed - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1653416
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com