139 |
|
|
140 |
def evaluateMacro(self, expr): |
def evaluateMacro(self, expr): |
141 |
# XXX Should return None or a macro definition |
# XXX Should return None or a macro definition |
142 |
|
__traceback_info__ = expr |
143 |
macro = self.evaluate(expr) |
macro = self.evaluate(expr) |
144 |
if type(macro) is types.StringType: |
if type(macro) is types.StringType: |
145 |
|
__traceback_info__ = (expr, macro) |
146 |
macro = pickle.loads(macro) |
macro = pickle.loads(macro) |
147 |
return macro |
return macro |
148 |
|
|
538 |
# now run the template |
# now run the template |
539 |
#result = pax.XML(tr_engine.transform(self.paxtree(), context), |
#result = pax.XML(tr_engine.transform(self.paxtree(), context), |
540 |
# root_ns_map, self.encoding) |
# root_ns_map, self.encoding) |
541 |
result = tr_engine.transform(self.paxtree(), context).text |
result = tr_engine.transform(self.paxtree(), context) |
542 |
result, encoding = encoding_neg.encode(result) |
result, encoding = encoding_neg.encode(result) |
543 |
# now this is hairy: how to get the official (IANA) http name |
# now this is hairy: how to get the official (IANA) http name |
544 |
# of the encoding based on the python name? |
# of the encoding based on the python name? |