加载中
python---简单的html模板生成代码

简单的html模板生成代码 #template auto genetate template = ''' <html>   <head>     <title>%(title)s</title>   </head>   <body>     <h1>%(title)s</h1>     <p>%(text)s</p>   </body> </html>'...

2012/03/11 12:36
21.7W
python---使用get方法访问‘数据库’实体

使用get方法访问‘数据库’实体 #simple database #people people = {   'Alice':{     'phone':'2341',     'addr':'Foo drive 23'   },   'Beth':{     'phone':'9102',     'addr':'Bar street 42'...

2012/03/11 15:42
21.4W
python---代码演示

def init(data):   data['first'] = {}   data['middle'] = {}   data['last'] = {} def lookup(data,label,name):   return data[label].get(name) def store(data,full_name):   names = full_...

2012/03/13 08:59
21.4W
pyhton---简单的价格和目录格式输出

width = input('Please enter width: ') price_width = 10 item_width = width - price_width header_format = '%-*s%*s' format = '%-*s%*.2f' print '=' * width print header_format % ...

2012/03/11 10:50
21.4W
python---简单数据库

#simple database #people people = {   'Alice':{     'phone':'2341',     'addr':'Foo drive 23'   },   'Beth':{     'phone':'9102',     'addr':'Bar street 42'   },   'Ceil':{     'phone':'3158'...

2012/03/11 12:23
21.4W
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---linux下升级python的版本

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

2012/04/15 20:29
1.6W
PYQT4 + Python2.7 + eric4-4.2.2a的安装全过程

第一步:下载Python2.7最新版本,(不推荐下载3.0版本,新版本还在测试中) http://www.python.org/ftp/python/2.7/python-2.7.msi 下载 PyQt-Py2.7-x86-gpl-4.9.5-1.exe http://www.riverb...

2012/10/06 23:02
1.2W
ubuntu12.04 python2.7.3+uwsgi+nginx

通过自己的不断坚持的努力,终于找到了这个解决方案 因为我的是ubuntu12.04 所以python的版本默认是2.7.3 nginx是通过sudo apt-get isntall nginx安装的 uwsgi也是通过sudo apt-get install ...

2012/05/20 11:26
5.8K
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实现csv转换为html

import sys def main(): maxwidth = 100 print_start() count = 0 while True: try: line = input() if count == 0: col...

2011/12/31 14:35
2.5K
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爬虫和数据挖掘

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

2012/04/11 21:28
2K
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的包管理pip安装

装python的包可以自己下来直接装,也可以通过pip来通过网络安装。 http://www.pip-installer.org/en/latest/installing.html 上面的链接包含了详细的过程。我这里只记录几个简要的命令给自己...

2012/10/14 01:33
1.7K
python---egg包的一些知识

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

2012/04/04 23:41
1.3K
Django入门:第一个Django应用

对Django这个 框架 感 兴趣 好久了,却一直懒于 研究 学习 ,现在跟随官网的 教程 跑一遍,学学Django同时也 继续 学学 Python 。 在开始之前, 我们 先把Python和Django这个框架安装好。 官...

2012/04/30 23:45
1.2K
Scrapy在Windows上的安装笔记

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

2012/04/30 18:53
1K

没有更多内容

加载失败,请刷新页面

返回顶部
顶部