摘要: r = redis.Redis(host='58.221.49.25',password='helloworld')n = r.lrange('dangd2:item',start=0,end=1) 阅读全文
posted @ 2017-11-10 10:39 人微言轻1 阅读(160) 评论(0) 推荐(0) 编辑
摘要: import loggingimport timelogging.basicConfig(filename='demo_error.log', filemode="a+", level=logging.DEBUG)try: a = 1/0 print(a)except: logging.info(time.strftime('%Y-%m-%d %H:%M:%S', time... 阅读全文
posted @ 2017-11-10 00:57 人微言轻1 阅读(153) 评论(0) 推荐(0) 编辑