sys模块

sys.exit()
sys.argv
sys.path

logging模块
logging.basicConfig(
level= ,
format= ,
filename= ,
filemode= ,
)#无法同时在文件和屏幕输出
logging.debug
logging.info
logging.warning
logging.error
logging.critical

logger方法
logger_obj=logging.getlogger()#获取logger对象
fh=logging.FileHandler('logger_file.txt)#文件输出
ch=logging.StreamHandler()#屏幕输出

logger_obj.setLevel(logging.DEBUG)

formater=logging.Formatter()

fh.setFormatter(formater)
ch.setFormatter(formater)

logger_obj.addHandler(fh)
logger_obj.addHandler(ch)

logger_obj.info('info')
logger_obj.error('error')
logger_obj.critical('critical')

先序列化再编码
json.dumps()序列化
json.loads()反序列化

json.dump()
json.load()