
python
一朵红杏
Proper preparation solves 80 percent of life's problems.
展开
-
ubuntu 下安装 pillow zlib
zlibc zlib1g zlib1g-devpython 安装图像处理 sudo pip install pillow原创 2016-05-18 14:00:40 · 969 阅读 · 0 评论 -
Python filter map reduce lambda Method detail
Python内置了一些特殊函数,这些函数很具python特性。可以让代码更加简洁。可以看例子:1 filter(function, sequence):str = [‘a’, ‘b’,’c’, ‘d’]def fun1(s): return s if s != ‘a’ else Noneret = filter(fun1, str)print ret[‘b’, ‘c’, ‘d’]对sequence中原创 2016-06-29 12:36:09 · 445 阅读 · 0 评论 -
PhthonDjango Server Develop For Mac
mac 自带python , 我们无需安装,可以安装python 的包管理器pip , 通过 pip install django==1.8.3 来选择安装对应的 django 版本 首先 , 安装 pip , 可以通过新建 get-pip.py 文件,通过python 指令运行来获得。python get-pip.pynext you can run direct as :pip inst原创 2016-07-28 17:46:45 · 381 阅读 · 0 评论 -
Python 'takes exactly 1 argument (2 given)' Python error
Python初学,定义urlConfig 接收参数,正常传递参数时,出现,多给了一个参数的错误问题,定义class的函数之后,在调用的时候出现“’takes exactly 1 argument (2 given)’ Python error”。查询Interesting ‘takes exactly 1 argument (2 given)’ Python error 之后,原来在python中,原创 2016-07-29 18:06:43 · 22972 阅读 · 0 评论 -
利用python 实现简单 爬虫
# coding:utf-8import reimport requests# 获取网页内容import pickler = requests.get('http://www.163.com')data = r.textserialInfo = '';# 利用正则查找所有连接link_list =re.findall(r"(?<=content=\").+?(?=\")|(?<=conte原创 2017-01-04 22:07:18 · 756 阅读 · 0 评论