CCap.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:concernCapture 作者: ctfu 项目源码 文件源码
def combineFiles(event):
    fileNames = tkFileDialog.askopenfilenames()
    fileNameTokens = fileNames[0].split("/")
    relFileName = fileNameTokens[len(fileNameTokens)-1]
    outFileName = "combined_" + "combine" + str(len(fileNames))
    print(outFileName)
    combineCommand = []
    combineCommand.append("cat")
    fileNameList = list(fileNames)
    for f in fileNameList:
        combineCommand.append(f)
    dir_path = "combine/"
    if not os.path.isdir("./" + dir_path):
        os.makedirs("combine/")
    outFile = open(os.path.join(dir_path, outFileName + ".txt"), "w")
    result = subprocess.call(combineCommand, stdout=outFile)
    print(result)
    outFile.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号