Skip to content
This repository has been archived by the owner on Feb 5, 2018. It is now read-only.

fix csv output line #6

Open
binary1230 opened this issue Aug 24, 2015 · 0 comments
Open

fix csv output line #6

binary1230 opened this issue Aug 24, 2015 · 0 comments

Comments

@binary1230
Copy link
Contributor

For the CSV output function

General Python note: the best practice for this would be to say

with open(filename, 'w') as f:
    f.writelines(lines)

Note that even if you were writing the lines individually instead of using writelines there's no reason to use os.linesep because Python will automatically convert \n to the appropriate line ending if you open in w mode. If you wanted to NOT do that, you would open in wb mode.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant