Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 ##############################################################################
00002 #
00003 # Copyright (c) 2005 Zope Corporation and Contributors. All Rights Reserved.
00004 #
00005 # This software is subject to the provisions of the Zope Public License,
00006 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
00007 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
00008 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00009 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
00010 # FOR A PARTICULAR PURPOSE.
00011 #
00012 ##############################################################################
00013 """PythonScripts interfaces.
00014 
00015 $Id: interfaces.py 40314 2005-11-22 13:21:47Z yuppie $
00016 """
00017 
00018 from zope.interface import Interface
00019 
00020 
00021 class IPythonScript(Interface):
00022 
00023     """Web-callable scripts written in a safe subset of Python.
00024 
00025     The function may include standard python code, so long as it does not
00026     attempt to use the "exec" statement or certain restricted builtins.
00027     """
00028 
00029     def read():
00030         """Generate a text representation of the Script source.
00031 
00032         Includes specially formatted comment lines for parameters, bindings
00033         and the title.
00034         """
00035 
00036     def write(text):
00037         """Change the Script by parsing a read()-style source text.
00038         """