Python

来自开放百科 - 灰狐
2007年2月4日 (日) 22:05Allen (讨论 | 贡献)的版本

跳转到: 导航, 搜索
Python-logo.gif

Python 最新版:2.5 , 下载最新版: http://download.huihoo.com/python/

Python 是一种面向对象的解释性的计算机程序设计语言,也是一种功能强大而完善的 通用型语言,已经具有十多年的发展历史,成熟且稳定。

At Google, python is one of the 3 "official languages" alongside with C++ and Java. Python at Google

Python Creator Scripts Inside Google: Inside Google, Python is the standard scripting language.

目录

版本

Python应用/框架

更多: Huihoo Python Applications

Python IDE

更多 IDEs: http://wiki.python.org/moin/IntegratedDevelopmentEnvironments

pygame

Python Enhancement Proposals(PEPs)

PEPs 有点类似 Java JSRs

更多 PEPs : http://www.python.org/dev/peps/

Linux

Python 2.3 on Debian

Debian 3.1 安装后自带 Python 2.3

Python 2.4 on Debian

wget http://www.python.org/ftp/python/2.4.4/Python-2.4.4.tgz
tar zxvf Python-2.4.4.tgz
cd Python-2.4.4
./configure 
make
make install // installed to /usr/local/lib/python2.4
/usr/local/bin/python2.4
Python 2.4.4 (#1, Feb  3 2007, 09:56:56) 
[GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Python 2.5 on Debian

wget http://www.python.org/ftp/python/2.5/Python-2.5.tgz
tar zxvf Python-2.5.tgz
cd Python-2.5
./configure 
make
make install 

Solaris

FreeBSD

Windows

http://download.huihoo.com/python/2.5/python-2.5.msi

运行命令行或集成开发环境 IDLE

>>> help()
help>modules 
help>sys
help>modules search 
help>SearchEngine
help>modules hash
help>hashlib
help>quit
>>>

获得 mod_python , http://www.apache.org/dist/httpd/modpython/win/

http://www.apache.org/dist/httpd/modpython/win/3.3.0b/mod_python-3.3.0b.win32-py2.5-Apache2.2.exe
会被安装到 C:\Python25\Lib\site-packages\ 
并在安装过程中提示输入 Apache 的位置, C:\apache-2.2.3
mod_python.so 被添加到 C:\apache-2.2.3\modules

修改 httpd.conf

LoadModule python_module modules/mod_python.so
<Directory "C:/myweb">
  SetHandler mod_python
  PythonHandler mod_python.publisher
</Directory>

创建index.py文件

def index(name):
  return "Welcome %s" % name   
http://localhost/python/?name=huihoo (OK :)

下载 mod_python example

http://www.modpython.org/examples/psp_site.tgz 
http://localhost/psp_site/

相关链接

联机文档

Python Web Services

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱