码迷,mamicode.com
首页 >  
搜索关键字:python pip    ( 138295个结果)
encoding declare
SyntaxError: Non-ASCII character '\xe6' in file google.py on line 17, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for detailsAd...
分类:其他好文   时间:2014-08-18 15:58:22    阅读次数:211
【和我一起学python吧】python 中的函数
一、函数的定义:Python中使用def关键字定义函数,函数包括函数名称和参数,不需要定义返回类型,Python能返回任何类型:Python代码#没有返回值的函数,其实返回的是Nonedefrun(name):printname,'runing'#函数体语句从下一行开始,并且第一行必须是缩进的>>>...
分类:编程语言   时间:2014-08-18 15:49:23    阅读次数:218
Python图片处理PIL/pillow/生成验证码/出现KeyError: 和The _imagingft C module is not installed
最近在用Python开发自己的博客,需要用到Python生成验证码,当然肯定要用到Python的图形处理库PIL,因为我用的是windows。 所以在安装好pil之后就开始写,就按照题目所说出现了The _imagingft C module is not installed 错误,找了很多建议,最后确定在windows下应该用pillpw。下载地址http://www.lfd.uci.edu/...
分类:编程语言   时间:2014-08-18 14:35:52    阅读次数:300
python去噪算法
《programming computer vision with python 》中denoise 算法有误,从网上好了可用的代码贴上,以便以后使用。书中错误的代码:def denoise(im,U_init,tolerance=0.1,tau=0.125,tv_weight=100): m...
分类:编程语言   时间:2014-08-18 14:22:32    阅读次数:429
玩转python之每次处理一个字符
在Python中字符就是长度为1的字符串,所以可以循环遍历一个字符串,依次访问每一个字符,得到你想要的处理前提;一个列表是个好主意,就像这样:thelist = list(thestring)当然,完全可以不用列表,对于喜欢循环遍历的人,他们有足够的理由这么做,因为并没有创建列表的过程:for c ...
分类:编程语言   时间:2014-08-18 14:19:12    阅读次数:132
random python
random.randrange(stop)random.randrange(start,stop[,step])Return a randomly selected element fromrange(start,stop,step). This is equivalent tochoice(ra...
分类:编程语言   时间:2014-08-18 14:13:35    阅读次数:162
python操作sqlserver
python连接sqlserver...
分类:数据库   时间:2014-08-18 12:31:54    阅读次数:171
python同步windows系统时间
python同步windows系统时间...
分类:编程语言   时间:2014-08-18 12:31:34    阅读次数:291
python清除数据库错误日志
清除sqlserver数据库错误日志:python...
分类:数据库   时间:2014-08-18 12:31:14    阅读次数:167
ConfigParser---python
# !/usr/bin/python# Filename:tcfg.pyimport ConfigParserconfig = ConfigParser.ConfigParser()config.read("/home/xxx/xxx/tcfg.ini")printsecs = config.sec...
分类:编程语言   时间:2014-08-18 12:25:34    阅读次数:178
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!