本站改版新增arduino频道
def debug_info(msg):
"""
print message if in DEBUG mode
"""
def log(msg):
debug_info(str(msg))
filename = r"log.txt"
with open(filename, "a+") as file:
# now = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
file.write("[%s]: %s\n" % (__name__, str(msg)))
file.flush()
def read_log():
filename = r"log.txt"
with open(filename, "r+") as file:
print(file.read())
Copyright © 2014 ESP56.com All Rights Reserved
晋ICP备14006235号-22 晋公网安备14108102001165号
执行时间: 0.0094408988952637 seconds