Subsections

1. Downloading, installing and running the demo

1.1 Prerequisite

CherryPy uses 100% pure Python, so it runs everywhere Python runs (Windows, Unix, Mac, ...). All you need is a working distribution of Python 2.1 or higher on your machine.

1.2 Downloading and installing

Download the latest version of CherryPy from this page http://www.cherrypy.org/download and unzip/untar the file

This will create a CherryPy-version/ directory with a few files and sub-directories

1.3 Running the demo

Go to the demo/ directory and type the following command:

python ../cherrypy.py Root.cpy
1.1 1.2

This will create a file called RootServer.py

To run it, just enter:

[remi@serveur demo]$ python RootServer.py
Reading parameters from RootServer.cfg ...
Calling initServer() ...
Reading gaz station database for the Prestation demo ...
Done reading database
Starting Httpd service ...
Server parameters:
portOrUnixFile: 8000
numberOfProcs: 1
staticContentList: [('images', 'images')]
Serving on 8000

Then open a web browser an type in the URL: http://localhost:8000/, and voila

You can play around with the demo website called Prestation or with the little tests that demonstrate a few of CherryPy's capabilities.

Now that we've downloaded CherryPy and run the demo, it's time to understand how a developer can develop a website using CherryPy...



Footnotes

... 1.1
"python" must be in your PATH and it must be version 2.1 or higher
... 1.2
If make is installed on your machine, you can just type "make"
See About this document... for information on suggesting changes.