tg.py 922 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # from model.DataBaseUtils import MysqlUtils
  2. # db=MysqlUtils()
  3. # with open('./zhangdu_account_config.csv','r',encoding='utf-8') as f:
  4. # # print(f.readlines())
  5. # for i in f.readlines():
  6. # a= i.replace('\n','')
  7. # db.quchen_text.execute(f"insert into order_account_text(platform,text) values('掌读','{a}')")
  8. # a={'x':11,'y11':2}
  9. # for i in a:
  10. # print(i)
  11. # a=['a','b']
  12. # b=[1,2]
  13. # print(dict(zip(a,b)))
  14. # get
  15. def zsq(func):
  16. def x(*args,**kwargs):
  17. try:
  18. func(*args,**kwargs)
  19. except Exception as e:
  20. print(e)
  21. return x
  22. def zsq2(info):
  23. def wrapper(func):
  24. def deco(*args, **kwargs):
  25. try:
  26. func(*args, **kwargs)
  27. except Exception as e:
  28. print(info, e)
  29. return deco
  30. return wrapper
  31. @zsq2("趣程")
  32. def a(p,q):
  33. print(p/q)
  34. if __name__ == '__main__':
  35. a(2,0)