Author damiro
Recipients damiro
Date 2013-09-19.12:58:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1379595509.08.0.968867256316.issue19050@psf.upfronthosting.co.za>
In-reply-to
Content
This snippet let my interpreter crash immediately:

> import sys, io
> io.open(sys.stdout.fileno(), 'wb')
> fd.close()
> sys.stdout.write("now writing on stdout will cause a crash")

That's happened on
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Windows 7 SP1 x64

The same code let Python 3.3.2 throw an exception like this:
Exception OSError: OSError(9, 'Bad file descriptor') in <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp850'> ignored
History
Date User Action Args
2013-09-19 12:58:29damirosetrecipients: + damiro
2013-09-19 12:58:29damirosetmessageid: <1379595509.08.0.968867256316.issue19050@psf.upfronthosting.co.za>
2013-09-19 12:58:29damirolinkissue19050 messages
2013-09-19 12:58:28damirocreate