JonathanB wrote:
On Aug 13, 3:52 pm, alex23 <wuwe...@gmail.com> wrote:
On Aug 13, 4:22 pm, JonathanB <doulo...@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.

changed that to
writer = csv.writer(open(output,'wb'),dialect='excel')

Now I get this error:

TypeError: must be bytes or buffer, not str

I'm using Python 3.1, maybe that changes things?

You want to open the file in text mode, but not write Windows line
endings (CRLF) for each newline:

    writer = csv.writer(open(output, 'w', newline=''), dialect='excel')
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to