astropy/astropy — comment on commit 36fdd91d0521fab29ee97aacb993e4cf8ba015ee
File:  line 0
By iguananaut:

@eteq `io.open()` here returns an `io.BufferedWriter` object, while just `open()` returns a normal `file` object.

I haven't looked at the surrounding code here, but it probably assumes that a `file` object is returned somewhere. I have some utility functions in PyFITS for dealing with file-opening in 2.x/3.x that might prove helpful here at some point.