diff --git a/file_object.py b/file_object.py index d2480ea..4004dd3 100644 --- a/file_object.py +++ b/file_object.py @@ -51,7 +51,7 @@ class SFileObject: ) with open(target_file_path, "wt") as file: for content in self._content: - _content=[str(x) for x in content] + _content = [str(x) for x in content] file.write("{content}\n".format(content=" ".join(_content))) def has(self, tower_number): # 塔位号是否存在S文件中。 @@ -94,6 +94,14 @@ class SFileAsSingle: s_file_obj.write(s_output_file_path) print("update S file {Ss}".format(Ss=s_output_file_path)) + def content(self): + s_file = self._s_files + for s in s_file: + d_file_obj = SFileObject(s) + s_content = d_file_obj.content() + for c in s_content: + yield c + class TaFileObject: def __init__(self, file_path, SFile): @@ -150,6 +158,7 @@ class TaFileObject: # 将S文件中的塔高同步到TA文件中。 def sync_tower_height_from_S(self): + pass def start(self):