def beginEnvironment(self, e):
     "starts a child environment"
     debug.begin(self, 'beginEnvironment(%s)' % e.__class__.__name__)
     assert e is not self
     self._currentEnv = e
     self.renderer.onBeginEnvironment(e)
     debug.end()
	def beginEnvironment(self,e):
		"starts a child environment"
		debug.begin(self,'beginEnvironment(%s)' % e.__class__.__name__)
		assert e is not self
		self._currentEnv = e
		self.renderer.onBeginEnvironment(e)
		debug.end()
 def endEnvironment(self, cl):
     debug.begin(self, 'endEnvironment(%s)' % cl.__name__)
     e = self.getenv()
     if e.__class__ is not cl:
         raise PdsError("""end%s requested but end%s expected."""\
              % (cl.__name__, e.__class__.__name__))
     self.renderer.onEndEnvironment(e)
     self._currentEnv = e.getParent()
     debug.end()
	def endEnvironment(self,cl):
		debug.begin(self,'endEnvironment(%s)' % cl.__name__)
		e = self.getenv()
		if e.__class__ is not cl:
			raise PdsError("""end%s requested but end%s expected."""\
								% (cl.__name__, e.__class__.__name__))
		self.renderer.onEndEnvironment(e)
		self._currentEnv = e.getParent()
		debug.end()