上传者: 38574132
|
上传时间: 2022-02-28 16:12:18
|
文件大小: 32KB
|
文件类型: -
具体代码如下所示:
import sys
import os
class Logger(object):
def __init__(self, filename=Default.log):
self.terminal = sys.stdout
self.log = open(filename, a)
def write(self, message):
self.terminal.write(message)
self.log.write(message)
def flush(self):
pass
path = os.path.ab