Python论坛  - 讨论区

标题:[python-chinese] 推荐一个Python模版引擎Myghty

2005年07月04日 星期一 17:14

清风 paradise.qingfeng at gmail.com
Mon Jul 4 17:14:04 HKT 2005

粗略的看了看,感觉还不错,推荐给大家http://www.myghty.org/
快速入门:http://www.myghty.org/docs/whatsitdo.myt

一段示例代码:
<%args>
    userid

<%python scope="init">
    # open a connection to an expensive resource
    ldap = Ldap.connect()
    userrec = ldap.lookup(userid)

    
    name: <% userrec['name'] %>
address: <% userrec['address'] %>
email: <% userrec['email'] %>
<%python scope="cleanup"> # insure the expensive resource is closed if ldap is not None: ldap.close() -- Blog:http://www.donews.net/changzheng

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2005年07月04日 星期一 17:47

Zoom Quiet zoom.quiet at gmail.com
Mon Jul 4 17:47:06 HKT 2005

不错!看起来很有感觉…………

在 05-7-4,清风<paradise.qingfeng at gmail.com> 写道:
> 粗略的看了看,感觉还不错,推荐给大家http://www.myghty.org/
> 快速入门:http://www.myghty.org/docs/whatsitdo.myt
> 
> 一段示例代码:
> <%args>
>     userid
> 
> <%python scope="init">
>     # open a connection to an expensive resource
>     ldap = Ldap.connect()
>     userrec = ldap.lookup(userid)
> 
> 
>     name: <% userrec['name'] %>
> address: <% userrec['address'] %>
> email: <% userrec['email'] %>
> > <%python scope="cleanup"> > # insure the expensive resource is closed > if ldap is not None: > ldap.close() > > > -- > Blog:http://www.donews.net/changzheng > > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese > > > -- [Time is unimportant, only life important!]

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号