刚刚开始接受WIX,我正在尝试为我的c#wpf app创建一个安装程序。
我想在programdata文件夹中创建的子文件夹中创建2个文件夹。
以下代码只会创建1个文件夹'数据'但不是' log'。
请问我做错了什么?
由于
def convert_json(fileName):
big = []
small = []
with open(fileName,'r') as file:
for line in file:
line = line.strip()
if line.startswith("--"):
if "big" in line:
array = big
keys = ["w1", "w2", "w3"]
sep = ";"
else:
array = small
keys = ["a", "b", "c"]
sep = ","
continue
values = line.split(sep)
# todo: make sure sizes match
mapping = dict(zip(keys, values))
array.append(mapping)
with open('smalljson.txt','w') as small_file:
json.dump(small, small_file)
with open('bigwater.txt','w') as big_file:
json.dump(big, big_file)
答案 0 :(得分:1)
您需要添加一个Directory =“EmptyLogFolderDir”的组件,与您对数据的操作相同。