
Python
zc02051126
这个作者很懒,什么都没留下…
展开
-
soaplib实现Webservice
1、安装setuptools,执行如下命令 sudo apt-get install python-setuptools安装该软件是为了下面使用easy_install命令安装soaplib2、安装soaplibsoaplib依赖于Twisted、lxml,而lxml依赖于libxml和libxslt2.1安装libxml下载libxml2-2.7.2.tar.原创 2013-04-01 16:16:37 · 1494 阅读 · 0 评论 -
Linux下Python打包工具PyInstaller使用说明
1 PyInstaller简介1.1 PyInstaller特性Ø 可以将Python脚本打包成可执行程序,在没有Python环境的机器上运行。Ø 可以在以下环境中执行:Windows (32-bit and 64-bit),Linux (32-bit and 64-bit),Mac OS X (32-bit and 64-bit),experimentally S原创 2013-04-20 13:52:46 · 22968 阅读 · 0 评论 -
重要的python算法包
Python(x,y)中没有包括的算法包:1、基于梯度的最优化方法OpenOpt:http://openopt.org/Welcome2、遗传算法Pyevolve:https://pypi.python.org/pypi/Pyevolve/0.5介绍文档:http://ftp.cbi.pku.edu.cn/pub/database/gene3d/gene3d/KG_PG_DATA/p1原创 2013-06-14 11:48:41 · 6949 阅读 · 0 评论 -
Python基本使用方法记录
1、文件迭代器for line in open('filename', 'r'):print line2、并行遍历:>>>L1=[1,2,3,4]>>>L2=[5,6,7,8]>>>zip(L1,L2)[(1,5),(2,6),(3,7),(4,8)]可以用for并行访问zip(L1,L2)中元素for (x,y) in zip(L1,L2):p原创 2013-04-03 15:53:59 · 1355 阅读 · 0 评论 -
Python中的编码问题
如有一路径"e:/software/测试.txt" 需要通过pyhon读/写 "测试.txt"文件,可以采用下面的方法: ipath = "e:/software/测试.txt" uipath = unicode(ipath , "utf8") 然后用"uipath"经过编码后的路径去open()即可。#coding=utf-8转载 2015-08-29 17:39:01 · 590 阅读 · 0 评论 -
Python处理中文字符
从中文文件中读取字符import codecs#写文件writer = codecs.open('p2p.txt', 'w', 'utf-8')。。。。。。。。。。。。。。。。。。writer.close()#读文件reader = codecs.open('p2p.txt', 'r', 'utf-8')。。。。。。。。。。。。。。。。。。reader.close()在脚本中添加#co转载 2015-08-06 17:53:16 · 955 阅读 · 0 评论 -
Python中文编码问题
引自: http://wolfmaster.iteye.com/blog/638029为什么会报错“UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-1: ordinal not in range(128)”?本文就来研究一下这个问题。 字符串在Python内部的表示是unicode 编码,因此,在做编码转载 2015-09-23 12:48:53 · 574 阅读 · 0 评论