appendString2Txt.py

from DataCleaning.library.functions.changeDirectory import *

def appendString2Txt(string, target, targetPath = ""):
tempWD = os.getcwd()
if targetPath != "":
os.chdir(targetPath)
else:
development2Processed()
with open(target, "a", encoding='utf-8') as f:
f.write(string)
os.chdir(tempWD)
posted @ 2021-10-05 20:19  石棠  阅读(20)  评论(0编辑  收藏  举报