提交 8cf116fb authored 作者: Frederic Bastien's avatar Frederic Bastien

When reading a file, tell python to automatically convert new lines to \n.

上级 9a2d3d5a
......@@ -1296,7 +1296,8 @@ class COp(Op):
func_files = [self.get_path(f) for f in func_files]
self.func_codes = []
for func_file in func_files:
with open(func_file, 'r') as f:
# U (universal) will convert all new lines format to \n.
with open(func_file, 'U') as f:
self.func_codes.append(f.read())
# If both the old section markers and the new section markers are
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论