Merge pull request #164 from techtonik/patch-1

Write notebooks with Unix newlines on Windows
Min RK 11 years ago
commit 83367684e1

@ -71,6 +71,8 @@ def atomic_writing(path, text=True, encoding='utf-8', **kwargs):
shutil.copy2(path, tmp_path)
if text:
# Make sure that text files have Unix linefeeds by default
kwargs.setdefault('newline', '\n')
fileobj = io.open(path, 'w', encoding=encoding, **kwargs)
else:
fileobj = io.open(path, 'wb', **kwargs)

Loading…
Cancel
Save