这与this question类似,只是我希望以一个新的BLF文件而不是.csv文件结束。我这样做是为了删除BLF文件中的一个损坏的对象,它阻止我将其导入Vector的软件中。我想有办法直接通过can.io.blf公司.BLFReader'由BLFReader直接生成到BLFWriter的类对象,但我很难弄清楚如何生成。下面的示例代码应该有助于解释我想要实现的功能:
import can
filename_in = "corrupted.blf"
log = can.io.BLFReader(filename_in)
filename_out = "cleaned.blf"
can.io.BLFWriter(filename_out,log)
我的解决方案是:
相关问题 更多 >
编程相关推荐