[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[OpenTAL-checkins] opental/OpenTAL/Static TAL_File.py
From: |
Fernando Lalo Martins |
Subject: |
[OpenTAL-checkins] opental/OpenTAL/Static TAL_File.py |
Date: |
Tue, 04 Mar 2003 20:33:58 -0500 |
CVSROOT: /cvsroot/opental
Module name: opental
Changes by: Fernando Lalo Martins <address@hidden> 03/03/04 20:33:58
Modified files:
OpenTAL/Static : TAL_File.py
Log message:
allowing for application-defined bindings
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/opental/opental/OpenTAL/Static/TAL_File.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: opental/OpenTAL/Static/TAL_File.py
diff -u opental/OpenTAL/Static/TAL_File.py:1.2
opental/OpenTAL/Static/TAL_File.py:1.3
--- opental/OpenTAL/Static/TAL_File.py:1.2 Wed Feb 26 06:30:24 2003
+++ opental/OpenTAL/Static/TAL_File.py Tue Mar 4 20:33:58 2003
@@ -29,6 +29,9 @@
'expr_engine': OpenTAL.Expressions.Engine(),
'root_ns_map': {},
'handlers': ('tal', 'metal'),
+ 'bindings': {
+ 'cwd': lambda self: Directory.Directory(os.getcwd())
+ }
}
# paxtransform handlers
@@ -116,7 +119,8 @@
if not kw.has_key('args'):
kw['args'] = args
bound_names['options'] = kw
- bound_names['cwd'] = Directory.Directory(os.getcwd())
+ for name, code in self.bindings.items():
+ bound_names[name] = code(self)
bound_names['template'] = self
context = self.context_class(self.expr_engine, names=bound_names)
context.encoding = self.encoding
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [OpenTAL-checkins] opental/OpenTAL/Static TAL_File.py,
Fernando Lalo Martins <=