astropy/astropy — pull request #2985 by josePhoenix (2014-09-26 14:11:18+00:00)
Title: Support file output from FITS diff given path name

A coworker was surprised that the functions in `fits.diff` don't transparently create files from string path names, and instead expect file objects. She pointed out that interactively poking around in data (as opposed to building a pipeline with clean separation of pieces) is a common use case for FITS diffing, and suggested that the `report` method support file path strings as an argument.

With this change,

```python
with open('./myreport.txt', 'w') as f:
myfitsdiffobject.report(fileobj=f)
```

becomes

```python
myfitsdiffobject.report('./myreport.txt')
```