MCPcopy Index your code
hub / github.com/Cats-Team/AdRules / write_file

Function write_file

script/utils.py:20–27  ·  view source on GitHub ↗

将行列表写入文件

(file_path, lines)

Source from the content-addressed store, hash-verified

18 return []
19
20def write_file(file_path, lines):
21 """将行列表写入文件"""
22 try:
23 with open(file_path, 'w', encoding='utf-8', newline='\n') as f:
24 for line in lines:
25 f.write(line + '\n')
26 except Exception as e:
27 print(f"Error writing {file_path}: {e}")
28
29def get_bj_time():
30 """获取北京时间"""

Callers 1

generate_surgeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected