Python
xiaobians
这个作者很懒,什么都没留下…
展开
-
Python For S60 文本编辑器
###################################-*- coding:utf8 -*- ## Author:[email protected] ## Purpose:Text edit programer ## ##########################...2008-06-03 16:56:21 · 216 阅读 · 0 评论 -
学习Python
学习:Python http://hetland.org/coding/http://www.poromenos.org/blog/1?page=42009-02-05 16:26:16 · 70 阅读 · 0 评论 -
Beautiful Soup 中文文档
http://www.crummy.com/software/BeautifulSoup/documentation.zh.html#Removing%20elements2009-02-05 16:17:54 · 58 阅读 · 0 评论 -
Python正则表达式
http://wiki.ubuntu.org.cn/Python%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F%E6%93%8D%E4%BD%9C%E6%8C%87%E5%8D%97 http://www.pythontik.com/blog/article.asp?id=150 http://www.juyimeng.com/python-re...2009-02-05 16:17:33 · 115 阅读 · 0 评论 -
PIL 学习。
http://blog.lazytech.info/http://www.laihj.net/pil%E7%BF%BB%E8%AF%91http://hi.baidu.com/ismayday/blog/item/8df358ee537771feb2fb95e0.htmlhttp://blog.chinaunix.net/u/14014/showart_1136901.htmlhttp:...2009-02-05 15:42:29 · 90 阅读 · 0 评论 -
Python 数据库开发
Python数据库操作。[size=large][b]Python与Mysql[/b][/size]一、安装MySQLdb模块使用python连接Mysql的前提,就是需要一个让python连接到Mysql的接口,这就是MySQLdb模块。验证是否已经安装了MySQLdb:===============================================...2009-05-15 09:51:56 · 179 阅读 · 0 评论 -
多线程下载文件
[code="python"]#!/usr/bin/python#coding=gbkimport reimport osimport sysimport timeimport globimport stringimport socketimport getoptimport urllibimport urllib2import thread...2008-05-20 15:22:59 · 85 阅读 · 0 评论 -
正则表达式
http://www.juyimeng.com/python-regular-expression-notes.htmlpython 中的re 模块正则表达式就个人而言,主要用它来做一些复杂字符串分析,提取想要的信息学习原则:够用就行,需要的时候在深入现总结如下:正则表达式中特殊的符号:“.” 表任意字符“^ ” 表string起始“$”...2008-05-20 11:53:17 · 126 阅读 · 0 评论 -
PythonForS60开发----开发环境的搭建
第一步:到http://sourceforge.net/project/showfiles.php?group_id=154155&package_id=171153 下载适合你手机的程序。程序包括【PythonForS60_1_4_3_2ndEdFP3.SIS:Python解释程序】【 PythonScriptShell_1_4_3_3rdEd.SIS脚本运行程序】第二步:安...2008-05-16 09:40:36 · 171 阅读 · 0 评论 -
python的robotparser模块
URL:http://nickcheng.com/2007/03/19/module-robotparser-in-python/读一个Python的爬虫代码的时候看到一个名字叫做”robotparser”的模块, 查了一下, 是用来解析网站的”robots.txt”文件的. 用法很简单, 举个例子rp = robotparser.RobotFileParser()rp.s...2008-04-24 09:36:57 · 977 阅读 · 0 评论 -
连接FTP服务器取回某个目录下的数据.
#-*-coding:utf8 -*-#!/usr/bin/env pythonfrom ftplib import FTPimport timeimport osimport loggingimport logging.handlersclass Log(): def __init__(self): pass ''' 记录日志到文件 ''' def logger(...2008-07-03 17:37:34 · 165 阅读 · 0 评论 -
Python中文问题
http://hi.baidu.com/newharvar/blog/item/bd36defd0a13d744d7887d6e.htmlsqlite默认编码是utf-8,在我们的PYTHON文件中设置文件保存编码及输出默认编码都为utf-8在python安装目录lib/site-packages,下新建 sitecustomize.py输入import syssys.setdefaulten...2008-06-05 17:06:58 · 88 阅读 · 0 评论 -
apply、map及函数工具、list的再构造
http://hi.baidu.com/peaksst/blog/item/457de91056bfa803213f2e99.htmlpython(22): apply、map及函数工具、list的再构造(14.2-14.5)2007-07-28 16:37首先来复习python中函数的定义。在python中,有两种方式可以用来定义一个函数。用def可以定义有名字的函数。用lamb...2008-06-05 15:19:31 · 128 阅读 · 0 评论 -
Python tips: 什么是*args和**kwargs?
http://www.cnblogs.com/fengmk2/archive/2008/04/21/1163766.htmlPython tips: 什么是*args和**kwargs? 先来看个例子:def foo(*args, **kwargs): print 'args = ', args print 'kwargs = ', kwargs print '--...2008-06-05 14:37:07 · 67 阅读 · 0 评论 -
Pyunit
http://pyunit.sourceforge.net/pyunit_cn.html#AUTHORhttp://pyunit.sourceforge.net http://www.ibm.com/developerworks/cn/linux/l-cptest.html2008-06-04 15:42:17 · 109 阅读 · 0 评论 -
字符串相似度算法Python实现
#!/usr/bin/env pythondef levenshtein(a,b): "Calculates the Levenshtein distance between a and b." n, m = len(a), len(b) if n > m: # Make sure n <= m, to use O(min(n,m)) spa...2009-02-05 16:33:31 · 668 阅读 · 0 评论