Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
很简单,我想打印出我的 genshi 模板中范围内的所有变量,作为调试和发现措施。有没有办法做到这一点?
标准的 Python 函数locals()(返回一个字典)对我有用。我正在使用 Genshi 0.5.1,正如你所看到的,一切似乎都在__data__.
__data__
${repr(locals())}