Python Programming Language -- Official Website
Home page for Python, an interpreted, interactive, object-oriented, extensible programming language. It provides an extraordinary combination of clarity and versatility, and is free and comprehensively ported.
中蟒 (中文 Python) 编程语言网站 chinesepython
中蟒 网站主页 中蟒是 Python 语言的中文版本. 提供即译式, 互动, 以概念出发并可扩展的程式语言. 其结构异常的清楚且用途极广. 目前已移植到非常多的操作平台上. 中蟒是免费的.
python zen 派森之禅
提供有关python的相关资料,包括django,twisted,pysqlite,pygame在内的资料,讨论python在中国的发展,应用,推广.致力更大程度传播python
limodou的学习记录
ActiveState O'Reilly Python cookbook code samples ratings review
ActiveState ASPN Python cookbook
Python 2.5 Documentation
None
Python Quick Reference
灵蛇网 - Python入门和学习最佳中文社区论坛
Dive Into Python
This book lives at . If you're reading it somewhere else, you may not have the latest version.
Twisted – Trac
Zope Corporation | Home
Zope delivers complete, robust, scalable content management solutions. Visible source licensing provides enterprise-quality out-of-the-box solutions, but also the ability to easily extend and customize the system.
Quixote
Webware for Python
Spyce - Python Server Pages (PSP)
Spyce - Python Server Pages: a server-side language that supports simple and efficient Python-based dynamic HTML generation.
python -- linux宝库
中文linux门户
Python Web 框架,第 1 部分: 使用 Django 和 Python 开发 Web 站点
本系列文章一共有两篇,本文是其中的第一篇。在这一篇文章中,我们将展示 Django 的用法,Django 是 Python 编程语言驱动的一个开源模型-视图-控制器(MVC)风格的 Web 应用程序框架。使用 Django,我们在几分钟之内就可以创建高品质、易维护、数据库驱动的应用程序。
Django | Download
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
FrontPage — Portal for CPUG.org
'''CPUG是中国第一个正式成立的Python用户的民间组织,在广大Python爱好者的推动下为宣传和发展Python而成立的。'''
Download SQLObject
TurboGears: Front-to-Back Web Development
TurboEntity - Introduction
TurboEntity is a declarative layer on top of SQLAlchemy
SQLAlchemy - The Database Toolkit for Python
简体中文MoinMoin/安装手册 - MoinMaster
WebProgramming - PythonInfo Wiki
mozdev.org - mozex: index
ONLamp.com -- Introducing mod_python
Grisha Trubetskoy introduces mod_python and explains what it can do.
Index of /mirror/apache/httpd/modpython/win/3.3.1
Django-JavaEye做最棒的软件开发交流社区
本专栏讨论Django框架技术及翻译www.djangobook.com。Django来自于无所不能的python。
wxPython 入门
您可以在几分钟内编写一段 Python脚本和让桌面拥有令人难以置信的相当漂亮的 GUI应用程序。这篇文章向您展示如何使用一 Python-著称的 GUI 库wxPython,来做到这一点的。向您的朋友和邻居介绍!
FrontPage - wxPyWiki
wxPython Download
Quixote - Huihoo Wiki - Open Source Wiki
Python - 木野狐 - 博客园
(web.py)
Tags:
Posted on July 27, 2007 12:26 PM | | Comments (1) | TrackBacks (0)

Ei�Us.y 豆瓣全部使用python开发。网站后台的搜索引擎基于Twisted,GUI基于Quixote. 还用到了cElementTree,MySQLdb和PIL.除了这些豆瓣基本是从头开发(一个人四、五个月)完成。 

e}5t ca  
Q:另外搜索引擎基于twisted? 能具体点吗?代码开放吗? 94/cY'qf  
7zL~p?C  
A: 只用了twisted.web中的client(用作spider)和resource(用作web上的搜索进度监控).spider控制, parser, 队列和访问控制都是从头写的。就是说,把twisted作为一个顶上的application框架和底层的传输库。中间大部分实质内容都是自己的。  \<Ouc  
h(WUu:M<  
豆 瓣将是商业网站(一般这样才可能持久),引擎开源的可能性不大。不过作为针对一些特定网站的搜索,写起来并不是很困难。麻烦的是各种意外和非规范做法的处 理(比如,不少中国网站为了提高page view的数目人为制造很多redirect)。所以比较琐碎。很难想像不用python会怎么样。 `]l2 (2Ie  
x%p\,Q  
Q:cElementTree这个东东和PIL是用来做网站什么的? h'?*O%  
'']\am\{  
A:cElementTree: XML处理。 搜索引擎搜到新书之后,会通过Web Service把书的信息上传豆瓣网站,需要这个。另外豆瓣将提供公共API和RSS. $-Yt|W  
T3tGLib  
PIL: 图像处理。IE提供的缩放质量是个笑话。豆瓣收到书的封面图像后,会把它scale成3种尺寸的图形文件在网站各处使用。PIL的antialias收缩 效果还可以(看看搜索结果页面中书的小图标就知道了). 另外用户大头照上传以后也是通过PIL缩成48×48的图标。 :U~yaaJ,.  
豆瓣的盈利模式目前还不便讨论,长远来说可能是竞价广告。 19&WS?0o=  
qlk:yt.O  
Q: 那么你的网站有两个应用,一个是搜索引擎,一个是网站.网站通过Quixote实现和用户交互,通过MySQLdb和MySQL数据库相连,提供Web Service接口供调用,并且提供RSS。那Web Service和RSS是你自己实现的吗?搜索的机器人自动搜索几个已定义的网站(当当,贝塔等)的网页html标签的特定字段,当搜索到新书的时候,通 过调用网站应用的Web Service借口把书的资料存到数据库,搜索引擎用PIL把图片缩放成三种尺寸的文件分别存到网站应用的特定目录。想问的是,如果这几个网站HTML的 特定标签变化了,你后台的程序是不是也需要变化? (EVjQ{ g[  
1~CM`2Dx  
A:Web Service是自己实现的,但是是比较简单直接的REST风格,用url标记的xml.现在还是内部使用,离公开可能还有时间。RSS还没有做。但我想会比较容易。 x!m Un2 z\  
F\@@2S\  
图片缩放是网站部分做的,不是搜索引擎。 Xy#Tbk1\  
g_+t-(5t  
HTML tag的问题很好。每个网站有一个adaptor, 定义了网站的特异性,比如搜索路径和目标数据项的signature。对,如果网站改版,adaptor要跟着变。只是大部分共性抽象出来以后,会比较容 易。这些adaptor更像template, 不像程序。

Continue reading "豆瓣与Python开发"
Tags:
Posted on July 27, 2007 12:15 PM | | Comments (0) | TrackBacks (0)

Karrigell and Cherrypy are Web Framework by Python,as Django

Karrigell


http://karrigell.sourceforge.net/en/front.htm

http://floss.zoomquiet.org/data/20050322130100/

http://blog.donews.com/limodou/archive/2005/04/21/345532.aspx

cherrypy

http://www.cherrypy.org/wiki/CherryPyDownload

Posted on July 27, 2007 11:12 AM | | Comments (0) | TrackBacks (0)

from MySQLdb import *

#setup a connection
conn=Connection(host='hostname', user='username', passwd='password', db='dbname')

#get a cursor from connection
#
#tuple result set, call default cursor class "cursors.Cursor"
c = conn.cursor()
# Most of the time, we use dictionary instead of tuple, get cursor link this:
c = con.cursor(cursors.DictCursor)

# execute a SQL statement, "r" is the rows affected
r = c.execute("SQL STATEMENT HERE")

# get all result from cursor, the result is a list containing result dict
# call c.fetchone if you want to minimize the overhead
rows = c.fetchall()

Posted on July 27, 2007 10:30 AM | | Comments (0) | TrackBacks (0)

  人们常常难以理解或预知实际系统的随机行为。有时可能精确论证系统的统计特性(诸如一般的、最差和最好的性能特性)。但在其它时候,只有实际运 行(或模拟)系统时,具体设计的缺陷才会显现出来。本文中,David 讨论了 SimPy,它是一种 Python 包,允许您非常方便地创建离散事件系统的模型。

  在我遇到 SimPy 包的其中一位创始人 Klaus Miller 时,从他那里知道了这个包。Miller 博士阅读过几篇提出使用 Python 2.2+ 生成器实现半协同例程和“轻便”线程的技术的 可爱的 Python专栏文章。特别是(使我很高兴的是),他发现在用 Python 实现 Simula-67 样式模拟时,这些技术很有用。

Continue reading "SimPy 简化了复杂模型"
Tags:
Posted on July 26, 2007 2:09 AM | | Comments (0) | TrackBacks (0)

  David 在本文中将带领我们了解一下 setuptools 框架,它是 Python Enterprise Application Kit(PEAK)的一个副项目。 setuptools 替换了标准的 distutils 库,并为 Python 添加了版本化的包和依赖性管理。Perl 用户比较熟悉 CPAN,而 Ruby 用户则比较熟悉 Gems;引导 setuptools 的 ez_setup 工具和随之而生的扩展后的 easy_install 与 “Cheeseshop”(Python Package Index,也称为 “PyPI”)一起工作来实现相同的功能。另外,setuptools 还让我们可以将自己的库包装成一个称为 “egg” 的包,它与 Java™ 的 JAR 文件类似,不过是用于 Python 的。

  Python Enterprise Application Kit(PEAK)的基础知识在本专栏的前两部分中已经进行了介绍:“可爱的 Python: Python Enterprise Application Kit” 和 “深入 PEAK 的新特性”。简而言之,PEAK 是用来在 Python 中进行快速组件开发和代码重用的强大框架。

  本文介绍了 setuptools 框架的内容,它是 PEAK 的一个副项目,它提供了比 distutils 更加简单的包管理和发行功能。

Continue reading "使用 setuptools 孵化 Python egg"
Posted on July 26, 2007 2:07 AM | | Comments (0) | TrackBacks (0)

setuptools is a collection of enhancements to the Python distutils (for Python 2.3.5 and up on most platforms; 64-bit platforms require a minimum of Python 2.4) that allow you to more easily build and distribute Python packages, especially ones that have dependencies on other packages.

Packages built and distributed using setuptools look to the user like ordinary Python packages based on the distutils. Your users don't need to install or even know about setuptools in order to use them, and you don't have to include the entire setuptools package in your distributions. By including just a single bootstrap module (an 8K .py file), your package will automatically download and install setuptools if the user is building your package from source and doesn't have a suitable version already installed.

By http://peak.telecommunity.com/DevCenter/setuptools

Tags:
Posted on July 26, 2007 12:37 AM | | Comments (0) | TrackBacks (0)

How to install Django,展示了如何在一台开发机器上设置 Django

Database API reference,使用 Django ORM 库的指南

Django template language,为模板作者准备的一份简单指南

How to serve static files,如何在开发过程中通过设置 Django 来提供静态文件服务的介绍(不要在产品环境中这样做)

How to use Django with mod_python,这是一份有关利用 mod_python 组合使用 Django 和 Apache 的指南

Generic views,展示了如何使用 Django 的通用视图更快地实现通用的 Web 应用程序模式

Python Web 框架,第 1 部分: 使用 Django 和 Python 开发 Web 站点

Power by Django

Python Web 框架,第 2 部分: 使用 TurboGears 和 Python 开发 Web 站点

Power by TurboGears

添加用户注册功能:


http://www.b-list.org/weblog/2006/09/02/django-tips-user-registration

http://feh.holsman.net/articles/2006/04/30/double-opt-in-user-registration-for-django

Tags:
Posted on July 26, 2007 12:24 AM | | Comments (0) | TrackBacks (0)