这个python什么问题:编译通过,运行正常,但是结果不正确,没有实现在每个文件中添加一行内容的功能
importglobimportosimportsysforroot,dirs,filesinos.walk(unicode("D:\\SecureCRSecureFXP...
import glob
import os
import sys
for root,dirs,files in os.walk(unicode("D:\\SecureCRSecureFXPortable64\\Data\\Settings\\Config\\Sessions\\0-data\\123","utf8")):
for f in files:
if f !='__FolderData__.ini':
input_file=open(f,'a')
input_file.writelines('dkdj')
input_file.writelines('S:"Script Filename"=D:\SecureCRSecureFXPortable32\Data\RecordedScript.vbs')
print (f +' already add!')
input_file.close() 展开
import os
import sys
for root,dirs,files in os.walk(unicode("D:\\SecureCRSecureFXPortable64\\Data\\Settings\\Config\\Sessions\\0-data\\123","utf8")):
for f in files:
if f !='__FolderData__.ini':
input_file=open(f,'a')
input_file.writelines('dkdj')
input_file.writelines('S:"Script Filename"=D:\SecureCRSecureFXPortable32\Data\RecordedScript.vbs')
print (f +' already add!')
input_file.close() 展开
2个回答
展开全部
父生财投戎旨在吃
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询