摘要:
pip install msgpack import msgpack,json js='{"person":[{"name":"zxc","age":18},{"name":"vbn","age":88},{"name":"uio","age":99}],"total":3}' d=json.loa 阅读全文
摘要:
import json from pathlib import Path pp={'a':123,'b':['bam',{'c':789}],'d':True,'m':False,'v':None} # print(p) # print(json.dumps(p)) # b=json.dumps(p 阅读全文
摘要:
s="""\ 1,tom,20, 2,jerry,30, 3,,, """ with open('c:/vbn.csv',mode='wt+') as f: # for line in s.splitlines(keepends=True): # print(line) # f.write(line 阅读全文
摘要:
import pickle from pathlib import Path file='d:/v/vbn' p=Path(file) if not p.parent.exists(): p.parent.mkdir(parents=True) with open(str(p),mode='wb') 阅读全文
摘要:
from configparser import ConfigParser cfg=ConfigParser() cfg.read('c:/mysql.ini') print(cfg.sections()) print(cfg.has_section('client')) print(cfg.ite 阅读全文