zhuifengshen / xmind2testcase

XMind2TestCase基于python实现,提供了一个高效测试用例设计的解决方案!
https://pypi.org/project/xmind2testcase/
MIT License
738 stars 254 forks source link

为什么xmind导出的cvs每行都会多一行呢? #17

Closed caihuan123456 closed 5 years ago

caihuan123456 commented 5 years ago

image

caihuan123456 commented 5 years ago

问题已解决,楼主不用看了 在打开文件时,手工指定newline参数为""即可避免空行

caihuan123456 commented 5 years ago

参考源码 def open(file, mode='r', buffering=None, encoding=None, errors=None, newline=None, closefd=True):

On input, if newline is None, universal newlines mode is enabled. Lines in the input can end in '\n', '\r', or '\r\n', and these are translated into '\n' before being returned to the caller. If it is '', universal newline mode is enabled, but line endings are returned to the caller untranslated.

fishasen commented 5 years ago

@caihuan123456 在代码里加newline='',貌似还是不行嘛!