I would like to discover all the keywords in a Kid template - that开发者_运维知识库 is, everything that needs to be passed to instantiate the template. Clearly, I could search for ${
, but there are complications with this such as the expression inside the ${}
could be complex. Also this does not address the xml markup that Kid provides.
Another possibility is to execute the template, catch the NameError
exception, fill in a "dummy" value and repeat. This is almost too painful to contemplate! :-)
There must be a better way!
精彩评论