Scrapy在Windows上的安装笔记

先前已经有一篇关于Scrapy的介绍了(Scrapy的架构),今天这篇文章是将怎么在Windows上安装Scrapy。 在安装Scrapy前首先需要确定的是已经安装好了Python(目前Scrapy支持Python2.5,Python2...

2012/04/30 18:53
1K
python解析万能的xml

xml文件 <website> <page name="index" title="Home Page">   <h1>Welcome to My Home Page</h1>   <p>Hi,there My name is Mr. Gumby, and this is my home page. here are some of my i...

2012/04/28 21:13
448
用python实现API --- 提供组件能够方便实现开放API

用python实现API django-piston之前用的人很多,现在更新不是很频繁,不推荐。 django-tastypie最近很火,值得关注。 我个人推荐djangorestframework。它使用了class based view,扩展起来很...

2012/04/27 08:28
816
python2.7---太阳黑子图形程序

太阳黑子图形程序 from reportlab.lib import colors from reportlab.graphics.shapes import * from reportlab.graphics import renderPDF data=[ # Year Month Predicted Hign Low   (2007...

2012/04/24 08:38
344
ubuntu11.10下面安装python中的MySQLdb模块教程(python2.7 my...

以前弄过一个很方便的一次性安装好mysql以及数据文件配置和python的MySQLdb库的脚本,今天在自己的ubuntu11.10下面用这个安装的时候发现一直报错,昨晚弄了一个晚上,想了想估计是redhat和u...

2012/04/23 23:21
786
ubuntu11.10 安装reportlab出现“Python.h: 没有那个文件或目录”

安装reportlab 出现的问题的解决办法是 sudo apt-get install python-dev 然后在执行安装的程序 我用的是ez_install.py的方式安装的 http://hi.baidu.com/carshrd/blog/item/afea4e2c3dcb72...

2012/04/23 22:34
365
python---解决“Unable to find vcvarsall.bat”错误

今天在安装reportlab时老是发生Unable to find vcvarsall.bat的错误,上网找了一下,在eddsn找到了“Unable to find vcvarsall.bat” error when trying to install rdflib这么一篇文章,解决...

2012/04/19 23:51
8.7W
python---练习---即时标记

这里只贴代码(python版本2.7.2) markup.py import sys,re from handlers import * from util import * from rules import * class Parser:   """   语法分析器读取文本文件,应用规则并且控...

2012/04/18 08:48
2.8K
python---linux下升级python的版本

我的linux系统:centos5.5 我要升级的版本是:2.7.3(目前我更新操作的最新版本【是在2这个系列中的,你也可以安装3系列的】) 升级python的步骤 参考资料如下: http://liluo.org/2010/08/c...

2012/04/15 20:29
1.6W
python beautifulsoup多线程分析抓取网页

python数据抓取 encoding=utf-8 #@description:蜘蛛抓取内容。 import Queue import threading import urllib,urllib2 import time from BeautifulSoup import BeautifulSoup hosts = ["ht...

2012/04/15 19:14
1.8K
Python抓取框架:Scrapy的架构

Python抓取框架:Scrapy的架构 最近在学Python,同时也在学如何使用python抓取数据,于是就被我发现了这个非常受欢迎的Python抓取框架Scrapy,下面一起学习下Scrapy的架构,便于更好的使用这...

2012/04/15 12:47
556
python urllib使用

简介: urllib2是python的一个获取url(Uniform Resource Locators,统一资源定址器)的模块。它用urlopen函数的形式提供了一个非常简洁的接口。这使得用各种各样的协议获取url成为可能。它同...

2012/04/14 22:04
230
python爬虫和数据挖掘

考虑用python做爬虫,需要研究学习的python模块 1内置的 urllib, urllib2 库用来爬取数据 2 使用BeautifulSoup做数据清洗 http://www.crummy.com/software/BeautifulSoup/ 编码规则 Beautifu...

2012/04/11 21:28
2K
Python strip lstrip rstrip使用方法

Python中的strip用于去除字符串的首位字符,同理,lstrip用于去除左边的字符,rstrip用于去除右边的字符。 这三个函数都可传入一个参数,指定要去除的首尾字符。 需要注意的是,传入的是一个...

2012/04/11 11:30
126
python---yield理解

def h():   print 'When Chuan',   m = yield 5   print m,'ljhlk'   d = yield 12   print 'We are together' c = h() m = c.next() d = c.send('Fighting') print 'We are never forget the da...

2012/04/11 11:29
550
python---easy_install 安装软件 及BeautifulSoup 中文乱码

安装easy_install工具 使用ez_setup.py脚本方便安装: wget - q http: // peak.telecommunity.com/dist/ez_setup.py python ez_setup.py 安装完后,最好确保easy_install所在目录已经被加到P...

2012/04/10 22:37
2.1K
python---egg包的一些知识

经常接触Python的同学可能会注意到,当需要安装第三方python包时,可能会用到easy_install命令。easy_install是由PEAK(Python Enterprise Application Kit)开发的setuptools包里带的一个命令...

2012/04/04 23:41
1.3K
python---LineReceiver实现记录服务器

服务器端 #LineReceiver protocol from twisted.internet import reactor from twisted.internet.protocol import Factory from twisted.protocols.basic import LineReceiver class Simp...

2012/04/04 23:10
813

没有更多内容

加载失败,请刷新页面