|
|
'IPeriodicTask', 'ITaskQueue', 'IMainLoop', 'IRerunnableCGI', |
'IPeriodicTask', 'ITaskQueue', 'IMainLoop', 'IRerunnableCGI', |
|
|
'IAdaptiveTask', 'IAdaptiveTaskSPI', 'ILock', |
'IAdaptiveTask', 'IAdaptiveTaskSPI', 'ILock', 'IWSGIApplication', |
|
|
'IBasicReactor', 'ITwistedReactor', 'ICheckableResource', |
'IBasicReactor', 'ITwistedReactor', 'ICheckableResource', |
|
|
def runCGI(stdin,stdout,stderr,environ,argv=()): |
def runCGI(stdin,stdout,stderr,environ,argv=()): |
"""Perform function and return exit code""" |
"""Perform function and return exit code""" |
|
|
|
class IWSGIApplication(Interface): |
|
"""A WSGI (PEP 333) application object""" |
|
def __call__(environ,start_response): |
|
"""See PEP 333""" |
|
|
def CGIFromComponent(ob): |
def WSGIFromComponent(ob): |
"""Turn PEAK components into publishable web apps""" |
"""Turn PEAK components into publishable web apps""" |
from peak.web.publish import CGIPublisher |
from peak.web.publish import CGIPublisher |
return CGIPublisher.fromApp(ob) |
return CGIPublisher.fromApp(ob) |
|
|
declareAdapter(CGIFromComponent, |
declareAdapter(WSGIFromComponent, |
provides=[IRerunnableCGI], forProtocols=[IComponent] |
provides=[IWSGIApplication], forProtocols=[IComponent] |
) |
) |
|
|
|
|
|
|
|
|
|
|
|
|
class IPeriodicTask(Interface): |
class IPeriodicTask(Interface): |
|
|
"""Thing that does work periodically""" |
"""Thing that does work periodically""" |