[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[OpenTAL-checkins] opental/OpenPT OpenPTBase.py
From: |
Fernando Lalo Martins |
Subject: |
[OpenTAL-checkins] opental/OpenPT OpenPTBase.py |
Date: |
Fri, 21 Feb 2003 00:06:39 -0500 |
CVSROOT: /cvsroot/opental
Module name: opental
Changes by: Fernando Lalo Martins <address@hidden> 03/02/21 00:06:38
Modified files:
OpenPT : OpenPTBase.py
Log message:
allow for old-style (pickled) macros
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/opental/opental/OpenPT/OpenPTBase.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: opental/OpenPT/OpenPTBase.py
diff -u opental/OpenPT/OpenPTBase.py:1.8 opental/OpenPT/OpenPTBase.py:1.9
--- opental/OpenPT/OpenPTBase.py:1.8 Thu Feb 20 05:37:40 2003
+++ opental/OpenPT/OpenPTBase.py Fri Feb 21 00:06:38 2003
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
-__version__='$Revision: 1.8 $'[11:-2]
+__version__='$Revision: 1.9 $'[11:-2]
# ugh, this import list needs to be cleaned up
import OpenTAL, pax, PTmetal_handler, pax.paxtransform, Zpax
@@ -136,6 +136,13 @@
if str(n) != '__call__':
raise
return ob
+
+ def evaluateMacro(self, expr):
+ # XXX Should return None or a macro definition
+ macro = self.evaluate(expr)
+ if type(macro) is types.StringType:
+ macro = pickle.loads(macro)
+ return macro
class RestrictedZopeContext(UnrestrictedZopeContext):
def __init__(self, bindings=None):