Adding the line
Tx=lambda *a: XML(str(T(*a))
to store.py in the model of eStore doesn't cause any errors.
In fact, it seems to be working in Shell.
After a good sleep, I realize findT() is made to look for T(), not Tx
()... isn't it?
If so, the regular expression in languages.py in gluon needs to be
changed to find Tx() as well as T().
I'm not familiar with regular expression, and will appreciate some
advice. The pattern (in ver.1.63.2) is
# pattern to find T(bla bla bla) expressions
PY_STRING_LITERAL_RE = r'(?<=[^\w]T\()(?P<name>'\
+ r"[uU]?[rR]?(?:'''(?:[^']|'{1,2}(?!'))*''')|"\
+ r"(?:'(?:[^'\\]|\\.)*')|" + r'(?:"""(?:[^"]|"{1,2}(?!"))
*""")|'\
+ r'(?:"(?:[^"\\]|\\.)*"))'
regex_translate = re.compile(PY_STRING_LITERAL_RE, re.DOTALL)
By the way, in epydoc(
http://mdp.cti.depaul.edu/examples/static/
epydoc/), it's
regex_translate = re.compile(r'(?s)(?<=[^\w]T\()(?P<name>[uU]?[rR]?(?:
\'\'\'(?:[^\']|\'{\1,2}(?!\'))*\'\'\')|(?:\'(?:[^\'\\]|\\.)*\')|
(?:"""(?:[^"]|"{1,2}(?!")\)*""")|(?:"(?:[^"\\]|\\.)*"))')
--
Teru