| Trees | Indices | Help |
|
|---|
|
|
1 ###########################################################################
2 #
3 # This program is part of Zenoss Core, an open source monitoring platform.
4 # Copyright (C) 2007, Zenoss Inc.
5 #
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License version 2 as published by
8 # the Free Software Foundation.
9 #
10 # For complete information please visit: http://www.zenoss.com/oss/
11 #
12 ###########################################################################
13
14 from Products.PageTemplates.Expressions import getEngine
15 from DateTime import DateTime
16
17 _compiled = {}
18
21
22
24 """Perform a TALES eval on the express using context.
25 """
26 compiled = talesCompile(express)
27 contextDict = { 'here':context,
28 'nothing':None,
29 'now': DateTime(),
30 }
31 if isinstance(extra, dict):
32 contextDict.update(extra)
33 res = compiled(getEngine().getContext(contextDict))
34 if isinstance(res, Exception):
35 raise res
36 return res
37
43
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Thu May 7 11:46:30 2009 | http://epydoc.sourceforge.net |