1 Star 0 Fork 45

jamsf93/qytang_Python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
2016.02.14 cgi language 打印小实验 py产生HTML (优化设计) 610 Bytes
一键复制 编辑 原始数据 按行查看 历史
现任明教教主-乾颐堂 提交于 2016-02-14 11:03 . new file
#!/usr/bin/python3.4
# -*- coding=utf-8 -*-
REPLY="""Content-Type: text/html
<HTML>
<TITLE>Languages2</TITLE>
<BODY>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<H1>Hello World Selector</H1>
<HR>
<FORM method=POST action="lang2reply.py">
<P><B>请选择一种语言:</B>
<P><select name=%s>
<option>ALL
%s
</select>
<P><input type=Submit>
</FORM>
</BODY></HTML>
"""
from lang2com import hellos, inputkey
options = []
for lang in hellos:
options.append("<option>" + lang)
options = "\n\t\t".join(options)
print(REPLY % (inputkey, options))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/jamsf93/qytang_Python.git
git@gitee.com:jamsf93/qytang_Python.git
jamsf93
qytang_Python
qytang_Python
master

搜索帮助