ajenhl / tacl

Tool for performing basic text analysis on the CBETA corpus
GNU General Public License v3.0
30 stars 9 forks source link

Results files are created with an extra \r on Windows #25

Closed ajenhl closed 9 years ago

ajenhl commented 9 years ago

This causes various serious problems in reporting, since the pandas DataFrame ends up with empty lines throughout.

See https://stackoverflow.com/questions/3191528/csv-in-python-adding-extra-carriage-return

Specifically, it is that sys.stdout is passed to the CSV writer, so it is not possible to specify newline="".