On Tue, Jul 14, 2015 at 9:13 AM,  <yongzhi.c...@gmail.com> wrote:
> #in my application.py:
> def checknow():
> ...
>     return TN_str
>
> render = web.template.render('templates/',globals={'stat':checknow})
>
> #in the template:
> $def with(checknow)
> ... ...
>     <h1><div>Test: $stat(checknow)</div></h1>

You've effectively taken a reference to the checknow function and
given it the name 'stat'. So when you call $stat(), I would expect it
to call checknow() with exactly those arguments. I don't know what
"$def with(checknow)" means, but if you figure out what checknow is
inside there, then you'll know whether you want any argument at all. I
suspect just "$stat()" may well do what you want.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to