摘要: 1,python中时间日期格式化符号: 2, 时间类型转字符串 time.strftime(fmt[,tupletime]) 3,字符串转时间类型 time.strptime(str,fmt='%Y-%m-%d %H:%M:%S ') 4,str 转 datetime 5, datetime 转st 阅读全文
posted @ 2017-12-27 16:50 wayens 阅读(83) 评论(0) 推荐(0)
摘要: python -PrettyTable 格式化展示 1,导入库 import prettytable 2,定义展示对象 row = prettrytable.PrettyTable() 3,添加标题头 row.filed_names=['查看可用额度','查看消费记录','还款','提现','转账' 阅读全文
posted @ 2017-12-27 11:43 wayens 阅读(195) 评论(0) 推荐(0)
摘要: 1,引入logging 程序包 import logging 2,定义一个logging对象 logger = logging.getLogger('logger_name') #给该对象分配一个对象名:logger_name 3,给logger对象设置日志级别: logger.setLevel(l 阅读全文
posted @ 2017-12-27 11:25 wayens 阅读(144) 评论(0) 推荐(0)