jdunck/python-unicodecsv — pull request #27 by blagarde (2014-02-01 09:38:01+00:00)
Title: Handy contexts and generator

Re-created https://github.com/jdunck/python-unicodecsv/pull/21 which was a mess.

This PR is a bit of a 'nice to have'.
It saves one line of code in the most frequent use case where the file-like object being read from/written to is... a file.
```
path = 'myfile.csv'

# 1. Simplified reader
from unicodecsv import xcsv
for row in xcsv(path):
print row

# 2. Simplified writer
from unicodecsv import uwriter
with uwriter(path) as ucsv:
for row in lst:
ucsv.writerow(row)
```