[issue30324] Error using newline='' when writing to CSV file

2017-05-09 Thread Martin Panter
Martin Panter added the comment: On Python 2, I'm guessing you are getting extra CRs on Windows? It looks like you have to open in binary mode there to avoid newline translation. This is documented for the "reader" and "writer" functions. -- ___ Pyt

[issue30324] Error using newline='' when writing to CSV file

2017-05-09 Thread BeamPower
BeamPower added the comment: Sorry, my mistake. I thought I was running Python 2.7, but I was running Python 3.1. By the way, is there a solution to the extra lines being written to a CSV file using Python 2.7? Thank you. -- ___ Python tracker

[issue30324] Error using newline='' when writing to CSV file

2017-05-09 Thread Martin Panter
Martin Panter added the comment: In Python 2, the "open" function doesn't have a "newline" parameter. Perhaps you were looking at the wrong documentation version. -- nosy: +martin.panter resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue30324] Error using newline='' when writing to CSV file

2017-05-09 Thread BeamPower
BeamPower added the comment: Sorry, I left out a detail... I am running Python 2.7.13 -- versions: +Python 2.7 ___ Python tracker ___

[issue30324] Error using newline='' when writing to CSV file

2017-05-09 Thread BeamPower
New submission from BeamPower: I am using the newline='' feature in my program to avoid the extra lines being placed between each line being written to a CSV file. This error is odd though... I used it before on a previous rev, and it worked fine. I think the CSV file writing feature has been a