
Priv
文章平均质量分 67
wavee
这个作者很懒,什么都没留下…
展开
-
Pylons笔记(一)
工作上使用pylons有几个星期了,零零散散的,在这里整理一下。 第一天 环境freebsd 8.1python2.6.6 首先安装自己的环境运行环境。一台机可以同时运行多个不同的环境,这样可以保证你的运行环境所包含的包,同时多个环境可以独立运行。 1,下载创建脚本 wget http://pylonsbook.com/virtualenv....2011-05-19 15:01:59 · 210 阅读 · 0 评论 -
Pylons笔记(二)
第一天(继续) hellowold 1, 创建项目 paster create --template=pylons HelloWorld 使用默认选项即可 如果你想查看参数:paster -hpaster create -h 2, 查看、修改配置 我把配置development.ini 改成 了base.ini方便输入。...2011-05-19 17:10:56 · 253 阅读 · 0 评论 -
自省的威力
apihelper.py 程序和它的输出现在应该非常清晰了。def info(object, spacing=10, collapse=1): """Print methods and doc strings. Takes module, class, list, dictionary, or string.""" methodList ...原创 2011-05-23 16:26:13 · 113 阅读 · 0 评论 -
django 模板 深度变量的查找
一点提示: Python的列表是从0开始索引。 第一项的索引是0,第二项的是1,依此类推。 句点查找规则可概括为: 当模板系统在变量名中遇到点时,按照以下顺序尝试进行查找: 字典类型查找 (比如 foo["bar"] ) 属性查找 (比如 foo.bar ) 方法调用 (比如 foo....原创 2011-05-23 21:33:28 · 135 阅读 · 0 评论 -
Heritrix man
Heritrix使用的初步总结http://jason823.iteye.com/blog/84206 http://blog.sina.com.cn/s/blog_4ef8aa560100bxop.html Heritrix man 1. IntroductionPrev Next1. ...原创 2010-11-19 10:56:25 · 222 阅读 · 0 评论 -
flask 备忘
写道# -*- coding: utf-8 -*-""" Flaskr flaskr.py ~~~~~~ A microblog example application written as Flask tutorial with Flask and sqlite3. :copyright: (c) 2010 by Armin Ronacher. ...原创 2011-09-29 18:32:27 · 155 阅读 · 0 评论 -
mysql freebsd my.cnf 设置
The Weblog of Titus BarikLet the love of learning rule humanity.my.cnf on FreeBSD 7Uncategorized — @ Monday, May 26, 2008FreeBSD does not automatically include a default my.cnf...原创 2011-10-01 21:29:48 · 424 阅读 · 0 评论 -
python 生成器 yield
def __xlsx2tuples(self, path): '''ganerator tuples from xlsx file ''' wb = load_workbook(path) sheets = wb.get_sheet_names() for sheet in sheets:...2011-08-04 15:25:18 · 136 阅读 · 0 评论 -
Python yield 用法
Python yield 用法http://www.pythonclub.org/python-basic/yieldyield 用法说明yield 简单说来就是一个生成器,生成器是这样一个函数,它记住上一次返回时在函数体中的位置。对生成器函数的第二次(或第 n 次)调用跳转至该函数中间,而上次调用的所有局部变量都保持不变。生成器 是 一个函数函...原创 2011-04-09 21:11:34 · 143 阅读 · 0 评论