Spaces:
Runtime error
Runtime error
File size: 559 Bytes
9fa1139 b5f9291 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
import sys
class Tee:
def __init__(self, file_name, mode='a'):
self.file = open(file_name, mode)
self.stdout = sys.stdout
def write(self, message):
self.file.write(message)
self.stdout.write(message)
def flush(self):
self.file.flush()
self.stdout.flush()
ttt = Tee("log.txt")
sys.stdout =ttt
sys.stderr =ttt
import os
os.system("python3 -m http.server 7860 -b 0.0.0.0 &")
import time
print("\n\nMODELLLLLLL save ")
os.system('cp log.txt old.txt')
while 1:
time.sleep(60)
|