3.1 pyhp -- Advanced PyHP methods

This module provides several methods and items that are useful for advanced PyHP pages.

addheader (string)
This method adds a single header line to the headers section of the document. This method can be called after some or all of the body has been output.

clearall ()
Clears both the data and headers sections and starts processing from this point as though nothing had been output. This method clears all output. If the page calling this method was included using the pyhp.include() call then all output, including that of the parent page, is erased. This method is useful for producing error output.

include (file)
Executes data in file (a Python file object, or equivalent object with seek() and read() operations) as a PyHP script in a fresh namespace. Headers and body in file are appended to present header and body respectively.

Python dictionary object that can be used for permanent storage. This does take memory but can offer significant speed savings if used well. The variable datadesc is always defined, but is only retained if the mod_python version is used and the PythonOption AllowStatic option is set in Apache.

mod_python request object for this connection. This variable is useful if you know mod_python and wish to control Apache functions.