摘要: 使用类封装了FTP的操作 阅读全文
posted @ 2016-01-21 16:57 similarface 阅读(1455) 评论(0) 推荐(0) 编辑
摘要: # -*- coding:utf-8 -*-#conding:utf-8__author__ = 'hdfs''''简洁 高效 明了ElementTree轻量级的 Python 式的 API ,它由一个 C 实现来提供。相对于 DOM 来说,ET 快了很多(见注释3)而且有很多令人愉悦的 API 可... 阅读全文
posted @ 2016-01-16 11:36 similarface 阅读(7978) 评论(0) 推荐(0) 编辑
摘要: #conding:utf-8# -*- coding:utf-8 -*-__author__ = 'hdfs'"""XML 解析 :DOM解析珍整个文档作为一个可遍历的对象 提交给应用程序,dom解析会将文档全部load进内存,这样对于大型的xml可能性能不多好。"""import pprintim... 阅读全文
posted @ 2016-01-16 11:23 similarface 阅读(1084) 评论(0) 推荐(0) 编辑
摘要: #books.xml Python & XML Python & HTML December 2001 Jones, Drake Programming Python, 4th Editio... 阅读全文
posted @ 2016-01-16 11:08 similarface 阅读(2145) 评论(0) 推荐(0) 编辑
摘要: ## Sphinx configuration file sample## WARNING! While this sample file mentions all available options,# it contains (very) short helper descriptions on... 阅读全文
posted @ 2016-01-15 16:55 similarface 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 在Centos or redhat 安装Sphinx1.首先安装依赖包$ yum install postgresql-libs unixODBC2.安装软件$ rpm -Uhv sphinx-2.2.1-1.rhel6.x86_64.rpm3.启动服务$ service searchd start... 阅读全文
posted @ 2016-01-15 15:54 similarface 阅读(589) 评论(0) 推荐(0) 编辑
摘要: #conding:utf-8__author__ = 'similarface'import sys#子字符串选择print('HK usa china'[5:10]) #a chi#字符串可以+print('similar'+'face') ... 阅读全文
posted @ 2016-01-15 11:08 similarface 阅读(432) 评论(0) 推荐(0) 编辑
摘要: #coding:utf-8__author__ = 'similarface''''序列的排列组合'''def permute(list): ''' 序列的排列数: abc=abc,acb,bac,aca,cab,cba :param list: :return: ''... 阅读全文
posted @ 2016-01-14 09:52 similarface 阅读(2436) 评论(0) 推荐(0) 编辑
摘要: #coding:utf-8__author__ = 'similarface'class BinaryTree: def __init__(self): self.tree=EmptyNode() def __repr__(self): return repr... 阅读全文
posted @ 2016-01-13 22:50 similarface 阅读(265) 评论(0) 推荐(0) 编辑
摘要: #coding:utf-8__author__ = 'similarface'class KeyedBinaryTree: def __init__(self):self.tree=EmptyNode() def __repr__(self):return repr(self.tree)... 阅读全文
posted @ 2016-01-13 22:49 similarface 阅读(501) 评论(0) 推荐(0) 编辑