Write notebooks with Unix newlines on Windows

This avoids unnecessary notebook linefeed conversions
when working with version control from different systems.
pull/164/head
anatoly techtonik 11 years ago
parent 0dcfc79b92
commit 5842156d82

@ -71,7 +71,7 @@ def atomic_writing(path, text=True, encoding='utf-8', **kwargs):
shutil.copy2(path, tmp_path)
if text:
fileobj = io.open(path, 'w', encoding=encoding, **kwargs)
fileobj = io.open(path, 'w', encoding=encoding, newline='\n', **kwargs)
else:
fileobj = io.open(path, 'wb', **kwargs)

Loading…
Cancel
Save