浙江省高等学校教师教育理论培训

微信搜索“教师资格证岗前培训”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

#!/usr/bin/env python
#encoding=utf-8

 


from bottle import route, run,redirect,request
t=""
html="""
<html>
<title>life is tough,use python~</title>
<body>
<form name="form1" action="/" method="post">
<textarea name="t" cols="80" rows="25">%s</textarea>
<input type="submit" name="sub" value="save" />
</form>
</body>
</html>
"""
#@route('/',method=["POST","GET"])
@route('/',method=["POST"])
def index():
    global t,html
    t=request.POST.get("t")
    print t

   
    return html%t

@route('/')
def index():
    global t,html
    print t
   
    return html%t

run(host='localhost', port=8084)

posted on 2012-04-16 20:14  lexus  阅读(268)  评论(0编辑  收藏  举报