Twisted Documentation: Setting up the TwistedQuotes application

# Setting up the TwistedQuotes application

## Goal

This document describes how to set up the TwistedQuotes application used in a number of other documents, such as mktap plugins and designing Twisted applications.

## Setting up the TwistedQuotes project directory

In order to run the Twisted Quotes example, you will need to do the following:

1. Make a `TwistedQuotes` directory on your system
2. Place the following files in the `TwistedQuotes` directory:
   - __init__.py (this file marks it as a package, see this section of the Python tutorial for more on packages);
   - quoters.py;
   - quoteproto.py; and
   - plugins.tml.
3. Add the `TwistedQuotes` directory's parent to your Python path. For example, if the TwistedQuotes directory's path is `/tmp/TwistedQuotes` add `/tmp` to your Python path. On UNIX this would be `export PYTHONPATH=/my/stuff:$PYTHONPATH`, on Microsoft Windows change the `PYTHONPATH` variable through the Systems Properites dialog to add `/my/stuff;` at the beginning.
4. Test your package by trying to import it in the Python interpreter:

       Python 2.1.3 (#1, Apr 20 2002, 22:45:31)
       [GCC 2.95.4 20011002 (Debian prerelease)] on linux2
       Type "copyright", "credits" or "license" for more information.
       >>> import TwistedQuotes
       >>> # No traceback means you're fine.

Index

Version: 2.4.0