If you want to try the examples in this chapter, you'll probably need to install a few extra pieces of software. You will obviously need Python and PostgreSQL. You'll also need the PyGreSQL interface. The easiest way to build PyGreSQL is to download it, unpack it, and run the included setup.py program. If you're using Linux (or Unix):
$ cd /usr/local/src
$ wget ftp://ftp.pygresql.org/pub/distrib/PyGreSQL.tgz
Length: 45,824 (unauthoritative)
100%[====================================>] 45,824 32.75K/s
17:12:32 (32.65 KB/s) - 'PyGreSQL.tgz' saved [45,824]
$ tar -zxvf PyGreSQL.tgz
$ cd PyGreSQL-version
Make sure that pg_config is in your $PATH search path before you run the next command. The setup.py program invokes pg_config to find the PostgreSQL components that it needs. pg_config is usually found in PostgreSQL's bin directory (the same directory that holds the psql and postmaster programs).
$ ./setup.py build running build running build_py running build_ext $ ./setup.py install running install running build ...
If you intend to use the Python-DB API (which I would recommend), you will also need the mx extensions package from Egenix (http://www.egenix.com/files/python/).
Some of the examples in this chapter make use of the Tkinter GUI toolkit (more on that later). Tkinter is usually distributed with Python, but you will also need the Tktable module. You can find Tktable.py at http://tktable.sourceforge.net.
3.133.142.193