07 2016 档案
摘要:from flask import current_app config = current_app.config SITE_DOMAIN = config.get('SITE_DOMAIN')
阅读全文
摘要:今天看到Python中的一个修饰符'@',不了解它的使用,查看了下官方文档,有了一点了解。 原文 PEP-318 网址:http://www.python.org/dev/peps/pep-0318/ 不得不佩服老外,治学很严谨,在python网站相关网页上把为什么使用decorator(主要为了简
阅读全文
摘要:for line in file.readlines(): line=line.strip('\n')
阅读全文
摘要:编辑 ~/.pip/pip.conf 文件(如果没有则创建之),将 index-url 开头的一行修改为下面一行: 如果运行 pip 时, 提示如下错误 请在 ~/.pip/pip.conf 最上方加上 [global] 这一 section header
阅读全文