cvtools.file_io.write module¶
-
cvtools.file_io.write.
dump_json
(data, to_file='data.json')[源代码]¶ 写json文件
参数: - data -- 待保存成json格式的对象
- to_file -- 保存的文件名
-
cvtools.file_io.write.
dump_pkl
(data, to_file='data.pkl')[源代码]¶ 使用pickle序列化对象
参数: - data -- 待序列化对象
- to_file -- 保存的文件名
-
cvtools.file_io.write.
write_key_value
(data, to_file)[源代码]¶ 写字典到文件中(非序列化)
每行以字符':'分割key和value
参数: - data (dict) -- dict中元素只能是基本类型
- to_file -- 保存的文件名
Returns: