1.增加在SFileAsSingle中输出所有文本文件的功能。
This commit is contained in:
parent
e28328eaf7
commit
223ed5a228
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue