On Aug 13, 4:22 pm, JonathanB <doulo... at gmail.com> wrote: > writer = csv.writer(open(output, 'w'), dialect='excel') I think - not able to test atm - that if you open the file in 'wb' mode instead it should be fine.