"""quixote

A highly Pythonic web application framework.
"""

__revision__ = "$Id: __init__.py,v 1.9 2001/10/10 18:01:41 gward Exp $"

__version__ = "0.4.1"

__all__ = ['publish', 'compile_template', 'imphooks', 'session', 'errors']

# These are frequently needed by Quixote applications, so make them easy
# to get at.
from quixote.publish import \
     Publisher, get_publisher, get_request, get_session, get_user

# Can't think of anywhere better to put this, so here it is.
def enable_ptl ():
    """
    Installs the import hooks needed to import PTL modules.  This must
    be done explicitly because not all Quixote applications need to use
    PTL, and import hooks are deep magic that can cause all sorts of
    mischief and deeply confuse innocent bystanders.  Thus, we avoid
    invoking them behind the programmer's back.  One known problem is
    that, if you use ZODB, you must import ZODB before calling this
    function.
    """
    from quixote import ptl_import
    ptl_import.install()
