import os
import time
basedir = os.path.abspath(os.path.dirname(__file__))
print(basedir)
t1 = time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
print(t1)
with open(basedir+"/"+"1.txt","a",encoding = "utf-8") as f:
f.write(t1+":"+"hello")
f.write("\r\n")
f.close()