#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-

from mod_python import apache, psp


def index(req):
    """Takes request from browser. Runs webpage."""
    
    req.content_type = 'text/html; charset = utf-8'
    tmpl=psp.PSP(req, filename='2-2-1.html')
    tmpl.run()

def data(req, hidden=' ', text_box=' ', text_area=' ', check_box=' ',
        radio_button=' ', drop_down_menu=' ', push_button=' '):
    """Takes request from client + seven variables. Writes it to client."""
    
    req.content_type = 'text/plain; charset = utf-8'
    req.write("hidden = " + hidden + "\n" + "text_box = " + text_box + "\n"
            + "text_area = " + text_area + "\n" + "check_box = "  
            + check_box + "\n" + "radio_button = " + radio_button + "\n"
            + "drop_down_menu = " + drop_down_menu + "\n" 
            + "push_button = " + push_button + "\n")
