Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
CGI 编程最大的资源之一是 CGI 主页。 完成后,请熟悉 cgi 和 cgitb 模块应该是您的下一个任务。
但不要忽视学习 WSGI (libref) 并使用 CGI 到 WSGI 适配器,例如 失败。
One of the biggest resources for CGI programming is the CGI homepage. Once you're done with that, familiarizing yourself with the cgi and cgitb modules should be your next task.
But don't discount learning WSGI (libref) and using a CGI-to-WSGI adaptor such as flup.
全部通过谷歌找到...
并看看 pyblosxom 以及: http://pyblosxom.svn.sourceforge.net/viewvc/pyblosxom/ 这是一个用 python 编写的博客系统,使用 CGI。
All found via google...
And take a look at pyblosxom as well: http://pyblosxom.svn.sourceforge.net/viewvc/pyblosxom/ it's a weblog system written in python, uses CGI.
我不明白的是为什么你坚持使用 CGI,因为这是一个通用网关接口,旨在与像 apache 这样的网络服务器结合使用,而你的设备上肯定没有。
我建议您使用 wsgiref.simple_server 这是一个单一的python 2.5 及更高版本附带线程内置网络服务器(如果您有 2.4 或更低版本,您可以 d/ l 来自pypi的wsgiref,它是一个纯python包)。 这样您还可以避开混乱的 CGI 编程并编写 wsgi 应用程序:
What I don't understand is why you insist on CGI, because that's a Common Gateway Interface meant to be used in conjunction with a webserver like apache, which you surely do not have on that device.
I would suggest you use wsgiref.simple_server which is a single threaded buildin webserver shipped with python 2.5 and up (if you have 2.4 or below you can d/l wsgiref from pypi, it is a pure python package). That way you can also sidestep messy CGI programming and write a wsgi application: