摘要: # coding=utf-8 #将列表写入文件 :'w+'(覆盖原有文件内容),'a+'(在原文件的基础上追加) def write_list_test(path,savelist,pattarn): try: f = open(path, pattarn) except IOError: print "The file don't exist, ... 阅读全文
posted @ 2015-12-06 13:09 奋斗的珞珞 阅读(422) 评论(0) 推荐(0) 编辑
摘要: # coding=utf-8 from datetime import date, datetime import time def date_test(): print 'date.max', date.max print 'date.min', date.min print 'date.today', date.today() sdate = date.t... 阅读全文
posted @ 2015-12-06 12:48 奋斗的珞珞 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 一,安装redis-py pip install redis easy_install redis 二,简单用法 import redis # 连接redis服务器 def conn_redis(): r = redis.StrictRedis(host='10.21.25.196', port=6379, db=0) return r #hash def test_has... 阅读全文
posted @ 2015-12-06 12:44 奋斗的珞珞 阅读(344) 评论(0) 推荐(0) 编辑