Python 是一種直譯式的腳本語言，是一個跨平台的的語言，可以在各個平台上面使用，如：Linux、Mac OS X、以及Microsoft Windows.
如果是初學 Python，可以考慮看 Dive Into Python，雖然他最後是更新的時間是2004年，但依然是一部免費而且很棒的教程。它含括了幾乎所有 Python 的基本元素，還有一些平常使用 Python 可以執行什麼任務，像是網頁的請求，檔案的處理。如果對於 Python 基礎已經基礎的概念，就可以參考 Text Processing In Python ，這本書將會對於 Python 有更進階的介紹。
- The Python Tutorial at docs.python.org
- Non-Programmer's Tutorial for Python 2.6 at Wikibooks
- Think Python: How to Think Like a Computer Scientist by Allen B. Downey (free PDF & HTML versions).
- Learn Python The Hard Way by Zed Shaw (free HTML verison)
- Building Skills in Python by Steven F. Lott (also available as a PDF)
當了解基礎的 Python，Code Like a Pythonista: Idiomatic Python 將幫助你了解一些 Python 特別的地方，還有跟別的語言的差異。
Free Online Courses
- Google's Python Class
- Learnstreet's Free Python Courses and Videos
- Python at Code Academy
- A Gentle Introduction to Programming Using Python at MIT
Python in Mozilla-based applications
Starting with Mozilla 1.9, Python DOM (PyDOM) bindings are implemented. This lets chrome XUL and HTML authors use Python in their <script> tags (again, not in the official Firefox/Thunderbird builds).
Python-based tools for Mozilla development
Python is used by Mozillians for tools that do various things with Mozilla apps and infrastructure. It would be useful to have a document on Python Environment and Tools for Mozilla.
Tools are listed here: http://k0s.org/toolbox/?language=python
Use of Python at Mozilla
Mozilla has considerable infrastructure based on python:
Python uses setup.py files to record metadata and installation instructions for python packages. Running (e.g.)
python setup.py install will install the package, making its modules available on python's import path. For python 2.x, several distribution/installation modules exist.
distutils is the only distribution package available in python's standard library.
distutils has ability to upload to the python package index and to install python packages. See the Python documentation on
distutils for details.
distutils is built in to python's standard library, setuptools is a third-party ad hoc standard for packaging and distribution. It is mostly compatible with
distutils, but importantly adds the ability for packages to include dependencies that are installed as prerequisites at the time
setup.py is invoked as well as the ability to install python packages in development mode. This allows the files to be edited in place via .pth files which is handy if you are actively working on a project.
setuptools also provides an
easy_install script for installing packages and their dependencies through the web from PyPI. For instance, in order to install the PyYAML package, just run
setuptools is not included with python, you will need to install it in order to use it. You may install it from the
setuptools PyPI page by downloading, extracting, and running
python setup.py install. Or you can use the
ez_setup.py script. You can download and run it with python (with root/Administrator privileges), or if you're in a bash shell, you can run
sudo python <(curl http://peak.telecommunity.com/dist/ez_setup.py)
setuptools is also provided with instances of virtualenv, so if you use virtualenvs for developing you may not need to install
setuptools globally. distribute is a fork of setuptools written by Mozilla's own Tarek Ziade. It is compatible with
setuptools and fixes a few bugs there.
The Python Package Index (PyPI) is the standard distribution point for python packages. If you need some functionality in python, it is a good place to look!
See also: http://k0s.org/portfolio/packaging.html