[Zope3-checkins] CVS: Zope3/src/zope/app/interpreter - interfaces.py:1.1 python.py:1.6

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 2 10:49:33 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/interpreter
In directory cvs.zope.org:/tmp/cvs-serv5419/src/zope/app/interpreter

Modified Files:
	python.py 
Added Files:
	interfaces.py 
Log Message:


Moved interfaces into the interpreter package.



Removed service API.




=== Added File Zope3/src/zope/app/interpreter/interfaces.py ===
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
#
##############################################################################
"""Interfaces for Code Interpreters

$Id: interfaces.py,v 1.1 2004/03/02 15:49:02 srichter Exp $
"""
from zope.interface import Interface

class IInterpreter(Interface):

    def evaluate(code, globals):
        """Evaluate the code given the global variables."""

    def evaluateRawCode(code, globals):
        """Evaluate the code given the global variables.

        However, this method does a little bit more. Sometimes (or in our case
        often) code might come from an uncontrolled environment, like a page
        template and is not properly formatted, i.e. indentation, so that some
        cleanup is necessary. This method does the cleanup before evaluating
        the code.
        """


=== Zope3/src/zope/app/interpreter/python.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/interpreter/python.py:1.5	Wed Feb 25 17:58:29 2004
+++ Zope3/src/zope/app/interpreter/python.py	Tue Mar  2 10:49:02 2004
@@ -18,7 +18,7 @@
 import StringIO
 import sys
 
-from zope.app.interfaces.interpreter import IInterpreter
+from zope.app.interpreter.interfaces import IInterpreter
 from zope.interface import implements
 from zope.security.interpreter import RestrictedInterpreter
 




More information about the Zope3-Checkins mailing list