SUMMARY
Python is a popular scripting language for Web sites that run under the UNIX platform. The Python language is cross-platform-aware. As a result, if you migrate Python scripts to Windows, you may only have to install the Python language interpreter. This article describes how to install the Python language interpreter and configure your Internet Information Services (IIS) server to use Python for Common Gateway Interface (CGI) scripts or Active Server Pages (ASP) processing.
back to the top
Install the ActivePython Distribution Package
To obtain ActivePython software, visit the following ActiveState Web site to download the ActivePython installer:
NOTE: This version of the ActivePython installer is a special version of the Python language interpreter that is designed to work under Windows and that has additional Windows specific extensions.
ActivePython version numbers use the same version numbering system of the main Python distribution package. Additionally, ActivePython gives a "build" number, which indicates the specific build (which typically includes new features, enhancements, and bug fixes). For example, the full ActivePython distribution package may be referred to as ActivePython 2.2.0 Build 221. Microsoft recommends that you always select the latest stable build of the ActivePython distribution package.
back to the top
Installing the ActivePython Software
- Log on to the Web server computer as an administrator.
- Download the ActivePython installer from the following ActiveState Web site:
- Double-click the ActivePython installer.
- After the installer confirms the version of ActivePython that it is going to be installed, click Next.
- If you agree with the terms of the license agreement, click I accept the terms in the license agreement, and then click Next.
If you click I do not accept the terms in the license agreement, you cannot continue the installation.
- To install the full ActivePython distribution package (this step is recommended), click Typical, and then click Next to continue the installation.
The software is installed in the default location (typically C:\Python plus the version number -- for example, C:\Python22).
- To customize the individual components or to change the installation folder, click Custom, click Next, and then follow the instructions that appear on the screen.
- Click Install to start the installation process.
- After the installation has completed, click Finish.
back to the top
Learn About Python
ActivePython comes with a complete set of documentation in HTML Help format. The language is also accessible in a number of different ways. For migration purposes, the interactive session is the most useful form of Help documentation.
back to the top
Reading the Documentation
ActivePython comes with a complete set of Python documentation, including some tutorials and guides, How-Tos and FAQ documents. To access the documentation, click
Start, point to
Programs, point to
ActiveState ActivePython X.X (where
X.X is the version number), and then click
ActivePython Documentation. The documentation is in the form of an HTML Help document, of which you can browse, search, and bookmark different sections.
back to the top
Starting an Interactive Session
To start Python in an interactive (command-line) session:
- Click Start, point to Programs, point to ActiveState ActivePython X.X (where X.X is the version number), and then click Python Interactive Shell.
- To quit the interactive shell, press CTRL+Z, and then press ENTER.
back to the top
Starting PythonWin IDE
IDE is a complete environment for building, testing, and debugging Python programs. To start IDE, click
Start, point to
Programs, point to
ActiveState ActivePython X.X (where
X.X is the version number), and then click
PythonWin IDE.
back to the top