tt-server/s2f.py

8 lines
209 B
Python
Raw Normal View History

2023-04-03 02:08:32 +00:00
import datetime
def save2file(data,isR=1):
# pass
t= datetime.datetime.now()
l=f"{'[R]' if isR else '[T]'} - {str(t)} --- {data.hex(' ')}\n"
f=open('./rxlog.txt','a')
f.write(l)
f.close