#coding:utf-8
import os
#-------代码段一
#获取当前文件夹
filePath = os.getcwd()
#获取当前文件列表
fileNameList = os.listdir(filePath)
fileDirList = []
#获取文件路径列表
for fileName in fileNameList:
fileDirList.append(os.path.join(filePath, fileName))
#--------代码段二
f = open('code.txt', 'w')
f.write("开始写文件n")
f.close()
for code in fileDirList:
f = open('code.txt', 'a')
split = os.path.splitext(code)
if(split[1] == '.h' or split[1] == '.cpp'):
fz = open(code, 'r')
string = "源代码文件" + code +"代码:n"
f.write(string)
content = fz.read()
print "文件 %s 读写成功" % code
f.write(content)
fz.close()
f.close()
print "读写成功"
g沙盒仇恨官方英文版(gorebox)
G沙盒仇恨英文原版是一款最近非常火热的沙盒模拟类游戏,在这里
迷你世界测试服最新版2024
迷你世界测试服2021最新版,即迷你世界的先遣服版本,用户能
闪耀暖暖最新版2024
闪耀暖暖手游这是非常好玩的换装手游,游戏内容丰富有趣,游戏环
杜拉拉升职记官方正版
杜拉拉升职记手游完美还原了经典同名电视剧中的故事剧情、以及各
银河战舰手机版
银河战舰满你所想宇宙战舰世界,茫茫宇宙资源是一切,你必须利用