python
iteye_7373
这个作者很懒,什么都没留下…
展开
-
python写json示例
[code="python"]#!/usr/bin/pythonimport jsonsource = '{"name":"polyahu", "type":"title"}'f = open('./json.data')j = json.loads(source)r = json.load(f)s = json.dumps(j)print "j's t.2013-02-08 22:06:28 · 73 阅读 · 0 评论 -
python读入文件和time/sys模块的简单使用
python读入文件和time/sys模块的简单使用一些标准库函数的用法也待学习,如:os/re/sets/string/queue/socket[code="python"]#!/usr/bin/pythonprint ord('a')print chr(97)#字符和整型互相转换fp = open("file.tmp")for line in f...2013-02-12 17:11:47 · 138 阅读 · 0 评论 -
django教程写的好
http://djangobook.py3k.cn/2.0/超赞,拜读。python的web框架不要太多... django、flask、bottle、tornado...原创 2013-02-12 18:35:23 · 93 阅读 · 0 评论 -
分解质因数小脚本
awk语言的版本,如下:[code="C"]{ x = $0; }function foo(a){ for (i = 2; i2013-02-12 20:24:22 · 486 阅读 · 0 评论