[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ApplicationControl - IRuntimeInfo.py:1.1.2.2 RuntimeInfo.py:1.1.2.2

Philipp von Weitershausen philikon@gmx.net
Wed, 10 Apr 2002 04:00:51 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ApplicationControl
In directory cvs.zope.org:/tmp/cvs-serv20943

Modified Files:
      Tag: Zope-3x-branch
	IRuntimeInfo.py RuntimeInfo.py 
Log Message:
Runtime does not return the whole environment anymore but just the PYTHONPATH instead


=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/IRuntimeInfo.py 1.1.2.1 => 1.1.2.2 ===
 # 
 ##############################################################################
-__doc__ = """ Runtime Information
+__doc__ = """ Runtime Information Interface
+
 $Id$"""
 
 from Interface import Interface
@@ -26,6 +27,10 @@
     def getPythonVersion():
         """Return a string containing verbose description of the python
 		   interpreter"""
+    
+    def getPythonPath():
+        """Return a tuple containing the lookup paths of the python interpreter
+        """
 
     def getSystemPlatform():
         """Return the system platform name in a 5 tuple of
@@ -35,12 +40,10 @@
         """Return the command line string Zope was invoked with"""
 
     def getProcessId():
-        """Return the process id number currently serving the request"""
+        """Return the process id number currently serving the request
+        """
 
     def getUptime():
         """Return a string containing the Zope server uptime in unix uptime
            format with seconds ([NN days, ]HH:MM:SS)"""
 
-    def getEnvironment():
-        """Return a dictionary with the environment variables
-           of the python interpreter"""


=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/RuntimeInfo.py 1.1.2.1 => 1.1.2.2 ===
+#
+# 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.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.
+# 
+##############################################################################
+__doc__ = """ Runtime Information
+
+$Id$"""
+
 from Zope.App.OFS.ApplicationControl.IRuntimeInfo import IRuntimeInfo
 from Zope.App.OFS.ApplicationControl.IApplicationControl import IApplicationControl
 from Zope.ComponentArchitecture import getUtility
@@ -30,6 +47,10 @@
         'See Zope.App.OFS.ApplicationControl.IRuntimeInfo.IRuntimeInfo'
         return sys.version
 
+    def getPythonPath(self):
+        'See Zope.App.OFS.ApplicationControl.IRuntimeInfo.IRuntimeInfo'
+        return tuple(sys.path)
+
     def getSystemPlatform(self):
         'See Zope.App.OFS.ApplicationControl.IRuntimeInfo.IRuntimeInfo'
         return os.uname()
@@ -45,10 +66,6 @@
     def getUptime(self):
         'See Zope.App.OFS.ApplicationControl.IRuntimeInfo.IRuntimeInfo'
         return time.time() - self.getContext().getStartTime()
-
-    def getEnvironment(self):
-        'See Zope.App.OFS.ApplicationControl.IRuntimeInfo.IRuntimeInfo'
-        return os.environ
 
     #
     ############################################################