def stdout_file(self,path1,path2):
oldStdout = None
logfile = None
x = filecmp.dircmp(path1,path2)
path1 = os.path.abspath(sys.argv[0])
filepath = os.path.dirname(path1)
self.find_file = filepath + "\\find_file.log"
try:
logfile = open( self.find_file,'w+')
oldStdout = sys.stdout
sys.stdout = logfile
x.report_full_closure()
finally:
if logfile:
logfile.close()
if oldStdout:
sys.stdout = oldStdout
result = self.find_str(self.find_file)
return result
file_cmp_class.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录