[Checkins]
SVN: zope.app.pythonpage/trunk/src/zope/app/pythonpage/__init__.py
Substitute zope.app.zapi by direct calls to its wrapped apis.
See bug 219302
Lorenzo Gil
lgs at sicem.biz
Thu Apr 24 15:17:48 EDT 2008
Log message for revision 85704:
Substitute zope.app.zapi by direct calls to its wrapped apis. See bug 219302
Changed:
U zope.app.pythonpage/trunk/src/zope/app/pythonpage/__init__.py
-=-
Modified: zope.app.pythonpage/trunk/src/zope/app/pythonpage/__init__.py
===================================================================
--- zope.app.pythonpage/trunk/src/zope/app/pythonpage/__init__.py 2008-04-24 19:02:11 UTC (rev 85703)
+++ zope.app.pythonpage/trunk/src/zope/app/pythonpage/__init__.py 2008-04-24 19:17:48 UTC (rev 85704)
@@ -19,13 +19,14 @@
import re
from persistent import Persistent
-from zope.app import zapi
+import zope.component
from zope.app.container.contained import Contained
from zope.app.interpreter.interfaces import IInterpreter
from zope.interface import Interface, implements
from zope.schema import SourceText, TextLine
from zope.i18nmessageid import ZopeMessageFactory as _
from zope.security.untrustedpython.interpreter import CompiledProgram
+from zope.traversing.api import getPath, getParent
class IPythonPage(Interface):
@@ -163,7 +164,7 @@
if self.__parent__ is None:
filename = 'N/A'
else:
- filename = zapi.getPath(self)
+ filename = getPath(self)
return filename
def setSource(self, source):
@@ -222,9 +223,10 @@
kw['request'] = request
kw['script'] = self
- kw['context'] = zapi.getParent(self)
+ kw['context'] = getParent(self)
- interpreter = zapi.queryUtility(IInterpreter, 'text/server-python')
+ interpreter = zope.component.queryUtility(IInterpreter,
+ 'text/server-python')
return interpreter.evaluate(self._v_compiled, kw)
def _print_usrc(match):
More information about the Checkins
mailing list