kennethreitz/records

csv output places records on every other line

bfmcneill opened this issue · 3 comments

When I export rows to .csv it seems like a new line is inserted between each record. Is this by design? Thanks!

'
import records
db_url = os.environ.get('DATABASE_URL')
db = records.Database(db_url)
rows = db.query_file('./the_best_sql_on_earch.sql')
f = open('./report.csv','w')
f.write(rows.export('csv'))
f.close()
`

Try setting newline='' in open()

Thanks!