Ejemplo n.º 1
0
"""

import logging
import mimetypes
import rfc822
import os
import stat
import time

from httpy._zope.interface import implements, moduleProvides

from httpy.interfaces import IApp, IApplication
from httpy.Response import Response

moduleProvides(IApp)

# Logging
# =======
logger = logging.getLogger('httpy.DefaultApp')


class Application:
    """This is httpy's default request respondor.
    """

    implements(IApplication)

    name = 'default httpy app'

    def __init__(self):
Ejemplo n.º 2
0
##############################################################################
#
# Copyright (c) 2004 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Test module that declares an interface

$Id$
"""
from httpy._zope.interface import Interface, moduleProvides


class I1(Interface):
    pass


class I2(Interface):
    pass


moduleProvides(I1, I2)
Ejemplo n.º 3
0
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Dummy Module

$Id$
"""
from httpy._zope.interface import moduleProvides
from httpy._zope.interface.tests.ifoo import IFoo
from httpy._zope.interface import moduleProvides

moduleProvides(IFoo)

def bar(baz):
    pass