摘要: ```python import logging logging.basicConfig( level=logging.DEBUG, format='[%(asctime)s ] [%(levelname)s] %(message)s', datefmt='%Y-%m-%d %H:%M:%S', # 日志输出到文件,文件名字可以自定义 # filename... 阅读全文
posted @ 2017-05-29 21:38 sawyer_aquarius 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 参考:http://docs.pythontab.com/interpy/c_extensions/ctypes/ Python中的ctypes模块可能是Python调用C方法中最简单的一种。ctypes模块提供了和C语言兼容的数据类型和函数来加载dll文件,因此在调用时不需对源文件做任何的修改。也 阅读全文
posted @ 2017-05-29 13:08 sawyer_aquarius 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 参考:http://docs.pythontab.com/ 实现该类的单例模式,使用装饰器的方法。装饰器实现单例模式的方法如下 输出的结果 python2.7 \ 4 \ 6 \ 35090992 35090992 阅读全文
posted @ 2017-05-29 10:55 sawyer_aquarius 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Django admin的设置 1.setting.py配置 创建数据库djangoproject 创建admin超级管理员 登录 阅读全文
posted @ 2017-05-29 00:10 sawyer_aquarius 阅读(112) 评论(0) 推荐(0) 编辑