欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Web.py
来自开放百科 - 灰狐
(版本间的差异)
第3行: | 第3行: | ||
==Install== | ==Install== | ||
wget http://webpy.org/web.py-0.2.tar.gz | wget http://webpy.org/web.py-0.2.tar.gz | ||
− | python setup.py install // install to | + | python setup.py install // install to /usr/local/lib/python2.4/site-packages/web |
touch code.py | touch code.py | ||
import web | import web | ||
第17行: | 第17行: | ||
python code.py | python code.py | ||
http://localhost:8080/ :) | http://localhost:8080/ :) | ||
+ | |||
+ | ==Template== | ||
+ | mkdir templates | ||
+ | cd templates | ||
+ | touch index.html | ||
+ | |||
+ | |||
[[Category:Web application frameworks]] | [[Category:Web application frameworks]] |
2007年2月6日 (二) 19:04的版本
Install
wget http://webpy.org/web.py-0.2.tar.gz python setup.py install // install to /usr/local/lib/python2.4/site-packages/web touch code.py import web urls = ( '/', 'index' ) class index: def GET(self): print "hello, webpy" if __name__ == "__main__": web.run(urls, globals()) python code.py http://localhost:8080/ :)
Template
mkdir templates cd templates touch index.html
分享您的观点