Standard Python Libraries/Modules Installed on DH and initial Python setup

It appears that DreamHost’s support for new Python users is extremely minimal. This extends to not providing a standard listing of Python modules that are pre-installed or common issues encountered while trying to use Python on DH. Consequently I have manually created the following listing of modules that are installed and a brief description of each as well as some basic tips. Please add your own.

Module Description
apt-xapian-index==0.44 maintenance tools for a Xapian index of Debian
argparse==1.2.1 makes it easy to write user-friendly command-line interfaces
babel==0.9.6 nternationalization library for Python. It has full unicode support and provides access to the CLDR data files.
boto-rsync==0.8.1 An rsync-like utility using boto’s S3 and Google Storage interfaces
boto==2.6.0 Python interface to Amazon Web Services
bucky==2.0.0 collecting and translating metrics for Graphite
chardet==2.0.1 The Universal Character Encoding Detector. Detects. ASCII, UTF-8, UTF-16 (2 variants), UTF-32
devscripts==2.11.6ubuntu1.6 ?
distribute==0.6.24dev-r0 Easily download, build, install, upgrade, and uninstall Python packages
django==1.3.1 high-level Python Web framework that encourages rapid development and clean, pragmatic design
dnspython==1.9.4 DNS toolkit for Python. It supports almost all record types. It can be used for queries, zone transfers, and dynamic updates
docutils==0.8.1 modular system for processing documentation into useful formats, such as HTML, XML, and LaTeX.
genshi==0.6 parsing, generating, and processing HTML, XML or other textual content
git-build-package==0.0.0 Build python Debian packages
httplib2==0.7.2 comprehensive HTTP client library that handles caching, keep-alive, compression, redirects and many kinds of authentication
iotop==0.4.4 Shows dashboard view of system processes
jinja2==2.6 modern and designer-friendly templating language for Python, modelled after Django’s templates
keyring==0.9.2 Access OS-level user/password management systems from Python.
ksplice-uptrack==1.2.6 programmatically query the status of their machines running Ksplice Uptrack
launchpadlib==1.9.12 launchpadlib is an open-source Python library that lets you treat the HTTP resources published by Launchpad’s web service as Python objects
lazr.restfulclient==0.12.0 ?
lazr.uri==1.0.3 includes code for parsing and dealing with URIs.
lxml==2.3.2 Powerful and Pythonic XML processing library combining libxml2/ libxslt with the ElementTree API
magic-file-extensions==0.2 related to: commonly supports the file command on Unix system, other than Max OSX which has its own implementation.
markupsafe==0.15 implements a unicode string that is aware of HTML escaping rules and can be used to implement automatic string escaping.
mercurial==2.0.2 cross-platform, distributed revision control tool for software developers
mysql-python==1.2.3 mysql database
numpy==1.6.1 fundamental package for scientific computing
oauth==1.0.1 implementation of the OAuth request- signing logic
pil==1.1.7 adds image processing capabilities to your Python interpreter. This library supports many file formats
psycopg2==2.4.5 PostgreSQL database adapter
pychecker==0.8.19 tool for finding bugs in python source code
pycrypto==2.4.1 collection of both secure hash functions (such as SHA256 and RIPEMD160), and various encryption algorithms
pycurl==7.19.0 nterface to libcurl. PycURL can be used to fetch objects identified by a URL from a Python program
pygments==1.4 syntax highlighting engine written in Python
pygresql==4.0 module that interfaces to a PostgreSQL database
pymacs==0.23 Interface between Emacs Lisp and Python.
pyopenssl==0.12 Open SSL interface
pyrite-publisher==2.1.1 converts HTML, text, and CSV databases into Palm platform PDA compatible formats, including Doc, zTXT, and JFile
pysqlite==2.6.3 sql lite interface
python-apt==0.8.3ubuntu7.2 interface to libapt, which allows you to query and manipulat APT package repository information
python-dateutil==1.5 module provides powerful extensions to the standard datetime module
python-debian==0.1.21ubuntu1 Debian
python-irclib==0.4.8 IRC
pytz==2011k allows accurate and cross platform timezone calculations
pyyaml==3.10 data serialization format designed for human readability and interaction with scripting languages
setproctitle==1.0.1 allows customization of the process title
simplejson==2.3.2 simple, fast, complete, correct and extensible JSON (which is a lightweight data-interchange format)
six==1.1.0 simple utilities for wrapping over differences between Python 2 and Python 3
sphinx==1.1.3 makes it easy to create intelligent and beautiful documentation
swiginac==1.5.1 providing Python with symbolic mathematics
symbolic==0.3 library for symbolic mathematics
trac==0.12.2 minimalistic web-based software project management and bug/issue tracking system
virtualenv== tool to create isolated Python environments
wadllib==1.3.0 for navigating WADL files. The Web Application Description Language is an XML vocabulary for describing the capabilities of HTTP resources.
wsgiref==0.1.2 reference implementation of the WSGI specification that can be used to add WSGI support to a web server or framework
zope.interface==3.6.1 libraries intended for reuse by projects to develop web applications or web frameworks

1- find a directory that is accessible by web url
2- create a new file called or index.cgi (if you have that configured)
3- put this in your file:
import pip # get a listing of all active modules
installed_packages = pip.get_installed_distributions()
installed_packages_list = sorted(["%s==%s
" % (i.key, i.version)
for i in installed_packages])
print installed_packages_list #or export to html for browser output
4- make sure your file is chmod 755 to be executable
5- beware of .htaccess files or web server defaults for which extensions get automatically loaded from a browser request for that folder
6- test via shell before browser as the browser ads additional complications
7- lots of code examples at

I’m trying a little app to force familiarizing myself with Python. As I am about to test my understanding of the web parts of the standard library, I thought I’d check DreamHost’s recommended approach. The wiki sent me to the Forum.

Thanks for your post. I’m sure you’ve reduced my fumbling by at least one order of magnitude, probably two.