摘要: code macname@localhost Desktop % cat exce.py import sys def tmp_func(): print(sys._getframe().f_code.co_name) tmp_func() macname@localhost Desktop % p 阅读全文
posted @ 2020-11-27 19:15 anobscureretreat 阅读(641) 评论(0) 推荐(0)
摘要: code import time import datetime t1=time.time() time.sleep(0.02) t2=time.time() print("相差",(datetime.datetime.fromtimestamp(t2)-datetime.datetime.from 阅读全文
posted @ 2020-11-27 19:13 anobscureretreat 阅读(2836) 评论(2) 推荐(0)
摘要: code import json new_dict={"func_name":"https://www.cnblogs.com/bigberg/p/6430095.html"} with open("record.json","w") as f: json.dump(new_dict,f) with 阅读全文
posted @ 2020-11-27 19:12 anobscureretreat 阅读(192) 评论(0) 推荐(0)